Created
May 22, 2013 13:04
-
-
Save ahoulgrave/5627396 to your computer and use it in GitHub Desktop.
Planetas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdlib> | |
#include <iostream> | |
using namespace std; | |
int main(int argc, char *argv[]) | |
{ | |
int opcionElegida; | |
char nombreDelPlaneta[] = "Olmedo"; | |
printf("Elija el planeta destino:\n\n"); | |
printf("1. Mercurio\n"); | |
printf("2. Marte\n"); | |
printf("3. Venus\n"); | |
printf("4. Neptuno\n"); | |
printf("5. Urano\n"); | |
printf("6. Pluton\n\n"); | |
scanf("%d", &opcionElegida); | |
switch(opcionElegida) { | |
case 1: | |
strcpy(nombreDelPlaneta,"Mercurio"); | |
break; | |
case 2: | |
strcpy(nombreDelPlaneta,"marte"); | |
break; | |
case 3: | |
strcpy(nombreDelPlaneta,"Venus"); | |
break; | |
case 4: | |
strcpy(nombreDelPlaneta,"Neptuno"); | |
break; | |
case 5: | |
strcpy(nombreDelPlaneta,"Urano"); | |
break; | |
case 6: | |
strcpy(nombreDelPlaneta,"Pluton"); | |
break; | |
default: | |
strcpy(nombreDelPlaneta,"la mierda"); | |
break; | |
} | |
printf("\nTe fiuiste a %s\n\n",nombreDelPlaneta); | |
system("PAUSE"); | |
return EXIT_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment