Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created May 19, 2021
Embed
What would you like to do?
int solicitarMedida() {
int medida;
while (1) {
printf("Ingrese la medida del bosque. Puede ser de 5, 7 o 9: ");
scanf("%d", &medida);
consumir_nueva_linea();
if (medida == 5 || medida == 7 || medida == 9) {
return medida;
} else {
printf("La medida no es correcta\n");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment