GOBIERNO,DEBE DE SER MAYOR DE EDAD Y DEBE SER COLOMBIANO.
El algoritmo sería el siguiente:
Inicio (variables a usar: edad, nacionalidad)
Escribir “Cual es su edad: ”
Leer edad Escribir “Cual es su nacionalidad: ”
Leer nacionalidad
Si (edad >= 18 y nacionalidad = costarricense)
entonces Escribir “Puede votar”
Sino Escribir “NO puede votar”
Fin (del si)
Fin (de inicio)
2. PARA QUE UNA PERSONA PUEDA CASARSE, DEBE DE SER MAYOR DE EDAD Y SOLTERO.
Inicio (variables a usar: edad, estado civil)
Escribir “Cual es su edad: ”
Leer edad Escribir “Cual es su estado civil: ”
Leer estado civil
Si (edad >= 18 y estado civil = soltero)
entonces Escribir “Puede casarse”
Sino Escribir “NO puede casarse”
Fin (del si )
Fin (del inicio)
3. DETERMINAR CUANTOS NUMEROS PARES HAY ENTRE 1 Y 10
Inicio
con=1
res=0
contador=1/2
si res=0
escribir"es par "
sino " es impar"
contador=1+1
Fin
El ciclo se repite
4. HAGA UN ALGORTIMO PARA DETERMINAR SI UN NUMERO ES NEGATIVO
Inicio (Variables num)
Escriba “digite un numero”
Leer num
Si num < 0 entonces
Escriba “Este numero es Negativo”
Sino
Escriba “Este numero NO es Negativo”
Fin (si)
Fin (inicio)
5. REALICE UN ALGORITMO QUE DETERMINE SI UN NUMERO ES POSITIVO
Inicio (Variables numero)
Escribir “Digitar un numero”
Leer numero
Si numero >= 0 entonces
Escriba “Este numero es POSITIVO”
Sino
Escriba “Este numero NO es POSITIVO”
Fin (si)
6. HAGA UN ALGORITMO QUE DETERMINE SI UN NUEMRO ES IGUAL A CERO
Escriba “Digite un numero”
Inicio ( numero )
Escribir " digite el numero "
Leer numero
Si ( numero = 0 )
Entonces escribir " el numero es cero "
Fin del si
Fin del inicio
7. DETERMINAR LA SUMA DE DOS NUMEROS ENTEROS
Inicio ( numero , numero2 , suma , re )
Escribir " digite el primer numero "
Leer numero = n1
Escribir " digite el primer numero"
Leer numero2 = n2
SUMA = n1 +n2
Escribir "SUMA"
Fin del inicio
8. DETERMINE SI UN NUMERO ES PAR
Inicio ( contador , residuo )
Leer CON = 1
Leer RES = 0
CON = CON /2
Si ( RES=0 )
Entonces escribir " es par "
Sino entonces escribir " es impar "
*CON =CON +1
Fin del si
9. LEA TRES NUMEROS Y DETERMINE EL MAYOR DE LOS TRES
Inicio ( numero1 , numero2 , numero3 )
Escribir " digite el primer numero ( A) "
Leer numero1= n1
Escribir " digite el segundo numero (B) "
Leer numero2= n2
Escribir digite el tercer numero (C) "
Leer numero3 = n3
Si ( n1>n2 y n1 >n3 )
Entonces escribir " el mayor es (A) "
Si ( n2 >n1 y n2 > n3 )
Entonces escribir " el mayor es (B) "
Si ( n3 >n1 y n3 >n2)
Entonces escribir " el mayor es (C) "
Fin del si
Fin del si
Fin del si
Fin del inicio
10. LEA 5 NUMEROS Y DETERMINE EL PROMEDIO.
Inicie ( numero1 , numero2 , numero3 , numero4 , numero5 )
Escribir " digite el numero1 (A) "
Leer numero1 = n1
Escribir " digite el numero2
No hay comentarios:
Publicar un comentario