Algoritmos

Páginas: 5 (1212 palabras) Publicado: 19 de julio de 2014
Desarrollo de los ejercicios de la diapositiva
1
1.Inicio
2.Lea valor a retirar
3.si valor a retirar es ######
2. lea numamarcar
escriba"ingrese el numero a marcar"
si (numamarcar = numamigo) entonces
escriba"hable con su amigo"
sino
escriba"el número que marcó es incorresto
fin si
fin

inicio
byte: nro_m_perdidas
float:por_m_ganadas

fin

6.

Inicio

String: nom
Byte:cnt_mp
Float:p_mg
Leer(nom,cnt_mp, p_mg)
Fin

7.

Inicio
String:nom
Float:p_sp
Byte:num_np
Leer(nom,p_sp,num_np)
Fin

8.

Inicio
String: nom
String:com_p
Int: d_p
Leer(nom,com_p,d_p)
Fin

9.

Inicio

String:nom
Byte: cm_c
Byte:cm_p
Float:pm_g
Leer(nom,cm_c,cm_p)
Pm_g= ( (cm_c - cm_p)/cm_c)*100
Mostrar(“el estudiante:”,nom,”ganó en un porcentaje de: ”,pm_g)
Fin10.

Inicio

String:nom
String:C_P
Int:P_c_p
Int:cd_p
Byte:cant_c
Leer(nom,c_p,C_P,P_c_p, cd_p,)
Cant_c= cd_p / P_c_p
Mostrar(“Usted “,nom”puede comprar la siguiente cantidad de platos”,cant_C)

11.

Inicio

String:nom
Byte:d_r
Byte:n_i
fLoat:prom
Leer(nom,d_r,n_i)
Prom=ni/d_r
Mostrar(“el deportista: “,nom,”recorre en promedio”,prom”)
Fin
12.

Inicio

Int:aInt:b
Float:resul
Leer (a,b)
Resul:(a+b) * 2 + 10
Mostrar:(“el resultado es:”,resul)
13.

Inicio
Int:b
Int:a
Float:Area
Byte:perimetro
Leer(b,a)
Area= b * a
Perimetro= (b + a) * 2
Mostrar(“el area es:”,area,”y el perimetro”,perimetro)
Fin

14.

Inicio
String:nom
Int:v_h
Byte:h_t
Int:sueldo
Leer(nom,v_h,h_t)
Sueldo= v_h * h_t
Mostrar=”el sueldo de: “,nom”es de: “,sueldoFin
15.

Inicio
String:nom_art
Int:val_art
Byte:cant_com
Int:total
Leer(nom_art,val_art,cant_com)
Total=cant_com * val_art
Mostra(“Usted debe pagar”,total,”del articulo”,nom_art)
Fin

16.
Inicio
Int:n
Boolean:res
Leer:(n)
Res=x< 3  && n < 20
Mostrar(“”el numero es: “,res)
Fin
17.

Inicio
Int: a , b, c
Boolean: RES
Lea: a, b, c
Res: a * c >= (b - 10)
Muestre: (“el numeroes “ ,RES)
Fin

18.
Inicio
float:hora
Lea:hora
Si (hora < 12.00) entonces
Muestre(“buenos dias)
Sino
Mouestre:(“BUENAS TARDES”)
Fin si
fin

19.
Inicio
Int: n1, n2, suma
Lea: n1 ,n2
Suma: n1+n2
si (n1+n2> 100) entonces
Muestre:(“la suma es mayor a 100”)
Fin si
fin
20.

Incio
String: nombre, apellido
Byte:Edad
Int:c_m
Leer:nombre,apellido,edad
C_m= edad * 12
Si(edad > 18) entonces
Mostrar(“usted”,nombre, apellido, “a vivido”,c_m,”meses”)
Fin si
Fin
19.
Inicio
float:area
Int:altura,base
Lea:base, altura
Area: base*altura /2
Si (base> altura) entonces
Mostrar:(“la base es mayor a la altura”)
Fin si
Si (base 10 && num < 20) entonces
Mostrar(“el cuadrado del numero es”,Cuad)
Fin si
Si (num > 20 && num < 50) entonces
Mostrar(“el doble delnumero es:”,Doble)
Fin si
Si (num > 50) entonces
Mostrar(“la mitad del numero es:”,Mitad)
Fin si
Fin

21.

Inicio
String:nom
Int:cantidad_h, V_h, total_p
Lea: nombre,cantidad_h, V_h
Total_p: V_h*cantidad_h
Si (total_p > 1000) entonces
Mostrar:(“la persona ”,nombre,”tiene como salario”,total_p)
Fin si
Fin
22.
Inicio
Int: num,doble
Float:mitad
Lea: num
Mitad=num / 2Doble=num / 2
Si (n mod 0 && n > 200) entonces
Mostrar(“el doble del numero es”,doble)
Fin si
Fin
Si (n mod 0 && n < 200) entonces
Mostrar(“la mitad del numero es”,mitad)
Fin si
Fin
23.
Inicio
Int: n, doble
Float: mitad
Lea: n
Doble: n*2
Mitad: n /2
Si (n mod 0) entonces
Mostrar:(“el doble del numero es”,doble)
Fin si
Si (n >200) entonces
Mostrar (“ la mitad del nuemro es ”,mitad)Fin si
fin

24
Inicio
String : nom
Byte : edad, sexo, estado civil
Lea: nombre, edad sexo, estado civil
Si (sexo = 2 && edad 0 || y > 0) entonces
Muestre (“x, y”)
Sino
Muestre (“ningun numero es positivo”)
Fin si
Fin

26

Inicio
Int : x, y
Lea:x, y
Si (x > 0 && y < 0) || (x0)
Muestre (“x, y”)
Sino
Muestre; (“ambos numeros son iguales”)
Fin si
fin

27
Inicio...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Algoritmo
  • Algoritmo
  • Algoritmos
  • Algoritmos
  • Algoritmos
  • Algoritmos
  • Algoritmos
  • Algoritmos

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS