Skip to content

Instantly share code, notes, and snippets.

@IanCarloz
Last active October 10, 2017 05:58
Show Gist options
  • Save IanCarloz/b3d7999b7abb24547a7e28cd89667fc3 to your computer and use it in GitHub Desktop.
Save IanCarloz/b3d7999b7abb24547a7e28cd89667fc3 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main() {
int numero;
printf("Escribe un numero del 1 al 12: ");
scanf("%d", &numero);
switch (numero) {
case 1:
printf("Enero.\n");
break;
case 2:
printf("Febrero.\n");
break;
case 3:
printf("Marzo.\n");
break;
case 4:
printf("Abril.\n");
break;
case 5:
printf("Mayo.\n");
break;
case 6:
printf("Junio.\n");
break;
case 7:
printf("Julio.\n");
break;
case 8:
printf("Agosto.\n");
break;
case 9:
printf("Septiembre.\n");
break;
case 10:
printf("Octubre.\n");
break;
case 11:
printf("Noviembre.\n");
break;
case 12:
printf("Diciembre.\n");
break;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment