Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created May 19, 2021 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/bf749b8ab9affa6bc271dd6019d35a08 to your computer and use it in GitHub Desktop.
Save parzibyte/bf749b8ab9affa6bc271dd6019d35a08 to your computer and use it in GitHub Desktop.
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