Last active
August 29, 2015 14:03
-
-
Save jamlfy/ca7d8bf301ffbe7368f6 to your computer and use it in GitHub Desktop.
El error esta los corchetes
This file contains hidden or 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<stdio.h> | |
| int opcion=0,A=0, B=0, C=0,opciondos=0; | |
| main(){ | |
| printf("\n MENU DE EJERCICIOS "); | |
| printf("\n "); | |
| printf("\n "); | |
| printf("\n "); | |
| printf("\n PRESENTADO POR JORGE ENRIQUE CADENA ROJAS "); | |
| printf("\n "); | |
| printf("\n "); | |
| printf("\n "); | |
| // Esto se solunciona colocando mas \n | |
| printf("\n "); | |
| printf("\n 1.- EJERCICIOS DE LA GUIA \n"); | |
| printf("\n 2.- EJERCICIOS DE EL LIBRO PAGINA 190 \n"); | |
| printf("\n 3.- VECTORES \n"); | |
| printf("\n 4.-MATRICES \n"); | |
| printf("\n 11.-Salir \n"); | |
| printf("\n "); | |
| printf("\n SELECCIONE UNA OPCION \n"); | |
| scanf("\n%d",&opcion); | |
| switch(opcion){ | |
| case 1:{ | |
| using namespace std; | |
| main(); | |
| cout<<"DIGITE EL VALOR UNO "; | |
| cin>>A; | |
| cout<<"DIGITE EL VALOR DOS"; | |
| cin>>B; | |
| cout<<"DIGITE EL VALOR TRES"; | |
| cin>>C; | |
| if ( A > B ){ | |
| if (A > C ) | |
| cout<<"EL VALOR UNO ES MAYOR "<<A; | |
| else | |
| cout<<"EL VALOR TRES ES MAYOR "<<C; | |
| } else { | |
| if ( B > C ) | |
| cout<<"EL VALOR DOS ES MAYOR "<<B; | |
| else | |
| cout<<"EL VALOR TRES ES MAYOR "<<C; | |
| } | |
| if ( A < B ){ | |
| if (A < C ) | |
| cout<<" EL VALOR UNO ES MENOR "<<A; | |
| else | |
| cout<<" EL VALOR TRES ES MENOR "<<C; | |
| }else{ | |
| if ( B < C ) | |
| cout<<" EL VALOR DOS ES MENOR "<<B; | |
| else | |
| cout<<" EL VALOR TRES ES MENOR "<<C; | |
| } | |
| getch(); | |
| return(0); | |
| //*------ Desde aqui Esta montado dado que no sabra en donde cierra el switch | |
| } | |
| break; | |
| } | |
| //*------ Hasta aqui Y este que que cierra esto | |
| // El error son los corchetes tiene que cerrarlos donde es | |
| case 2:{ | |
| puts("Recargas"); | |
| puts("GRACIAS POR SU PREFERENCIA"); | |
| break; | |
| } | |
| case 3:{ | |
| puts("\nRetiro en efectivo"); | |
| puts("\nCuanto deseas retirar:"); | |
| puts("\nElige la opcion que quieras para retirar"); | |
| puts("\nPuedes elegir:"); | |
| puts("\n4.- $20"); | |
| puts("\n5.- $50"); | |
| puts("\n6.- $100"); | |
| puts("\n7.- $200"); | |
| puts("\n8.- $500"); | |
| puts("\n9.- $1000"); | |
| puts("\nElige la opcion que quieras"); | |
| break; | |
| } | |
| case 4:{ | |
| puts("Elegiste la opcion de $20"); | |
| puts("GRACIAS POR SU PREFERENCIA"); | |
| break; | |
| } | |
| case 5:{ | |
| puts("Elegiste la opcion de $50"); | |
| puts("GRACIAS POR SU PREFERENCIA"); | |
| break; | |
| } | |
| case 6:{ | |
| puts("Elegiste la opcion de $100"); | |
| puts("GRACIAS POR SU PREFERENCIA"); | |
| break; | |
| } | |
| case 7:{ | |
| puts("Elegiste la opcion de $200"); | |
| puts("GRACIAS POR SU PREFERENCIA"); | |
| break; | |
| } | |
| case 8:{ | |
| puts("Elegiste la opcion de $500"); | |
| puts("GRACIAS POR SU PREFERENCIA"); | |
| break; | |
| } | |
| case 9:{ | |
| puts("Elegiste la opcion de $1000"); | |
| puts("GRACIAS POR SU PREFERENCIA"); | |
| break; | |
| } | |
| case 11:{ | |
| puts("Elejiste la opcion de salir"); | |
| puts("GRACIAS POR SU PREFERENCIA"); | |
| break; | |
| } | |
| default: | |
| puts("opcion erronea"); | |
| } | |
| getchar(); | |
| getchar(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment