You are on page 1of 1

EJERCICIOS DE ALGORITMOS

LOS SIGUIENTES EJERCICIOS DE ALGORITMOS ESTAN RESUELSO:

1- PARA QUE UNA PERSONA PUEDA EJERCER SU VOTO EN UNA ELECCION DE GOBIERNO,
DEBE DE SER MAYOR DE EDAD Y DEBE SER COSTARRICENSE.

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)


Escribir “Cual es su edad: ”
Leer edad
Escribir “Cual es su estado civil: ”
Leer estado
Si (edad >= 18 y estado = soltero) entonces
Escribir “Se puede CASAR”
Sino
Escribir “NO puede CASARSE”
Fin (del si)
Fin (de inicio)

Nota: Cualquier error que vean por favor comunicarlo, Gracias.

You might also like