-
-
Save rcstr/fd72285facebe9f0bb357d20fc294c00 to your computer and use it in GitHub Desktop.
Revisions
-
rcstr revised this gist
Nov 19, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,7 @@ main(){ for (int i = 0; i < partidos_n; i++) { printf( "%s\n", partidos[i] ) } printf("\n\n seleccione partido: "); scanf("%d", &partido); printf("\n\n seleccione numero de asientos: "); scanf("%d", &asientos); -
rcstr revised this gist
Nov 19, 2019 . 1 changed file with 12 additions and 13 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,23 +2,22 @@ main(){ string partidos[] = { "01 Jan", "07 Jan", "14 Jun", "01 Feb", "07 Feb", "14 Feb", "21 Feb", "01 Mar", "07 Mar", "14 Mar", "21 Mar", "01 Apr", "07 Apr", "14 Apr", "21 Apr", "01 May", "07 May", "14 May", } @@ -27,12 +26,12 @@ main(){ int entradas = 0; do { printf("\n\n\t Bienvenido!"); printf("\n\n\t seleccione un partido:\n"); for (int i = 0; i < partidos_n; i++) { printf( "%s\n", partidos[i] ) } printf("\n\n seleccione partido: "); scanf("%d", &partido); printf("\n\n seleccione numero de asientos: "); scanf("%d", &asientos); -
rcstr revised this gist
Nov 19, 2019 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ #include<stdio.h> main(){ string partidos[] = { "01 Jan", "07 Jan", "14 Jun", "21 Jan", @@ -28,11 +28,11 @@ main(){ do { printf("\n\n\t Bienvenido! "); printf("\n\n\t seleccione un partido: \n"); for (int i = 0; i < partidos_n; i++) { printf( "%s\n", partidos[i] ) } printf("\n\n seleccione partido: "); scanf("%d", &partido); printf("\n\n seleccione numero de asientos: "); scanf("%d", &asientos); -
rcstr revised this gist
Nov 19, 2019 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -28,11 +28,11 @@ main(){ do { printf("\n\n\t Bienvenido! "); printf("\n\n\t seleccione un partido: \n"); for (int i = 0; i < partidos_n; i++) { printf( "%s\n", partidos[i] ) } printf("\n\n seleccione partido: "); scanf("%d", &partido); printf("\n\n seleccione numero de asientos: "); scanf("%d", &asientos); -
rcstr revised this gist
Nov 19, 2019 . No changes.There are no files selected for viewing
-
rcstr revised this gist
Nov 19, 2019 . No changes.There are no files selected for viewing
-
rcstr revised this gist
Nov 19, 2019 . No changes.There are no files selected for viewing
-
rcstr revised this gist
Nov 19, 2019 . 1 changed file with 24 additions and 23 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,26 +1,26 @@ #include<stdio.h> main(){ string partidos[] = { "01 Jan", "07 Jan", "14 Jun", "21 Jan", "01 Feb", "07 Feb", "14 Feb", "21 Feb", "01 Mar", "07 Mar", "14 Mar", "21 Mar", "01 Apr", "07 Apr", "14 Apr", "21 Apr", "01 May", "07 May", "14 May", } int partidos_n = sizeof(partidos) / sizeof(partidos[0]); @@ -31,9 +31,10 @@ main(){ printf("\n\n\t seleccione un partido: \n"); for (int i = 0; i < partidos_n; i++) { printf( "%s\n", partidos[i] ) } printf("\n\n seleccione partido: "); scanf("%d", &partido); printf("\n\n seleccione numero de asientos: "); scanf("%d", &asientos); } while(entradas < 19) } -
rcstr revised this gist
Nov 19, 2019 . 1 changed file with 35 additions and 87 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,91 +1,39 @@ #include<stdio.h> main(){ Date partidos[] = { {1, 1, 2019}, {7, 1, 2019}, {14, 1, 2019} {21, 1, 2019}, {1, 2, 2019}, {7, 2, 2019}, {14, 2, 2019}, {21, 2, 2019}, {1, 3, 2019}, {7, 3, 2019}, {14, 3, 2019} {21, 3, 2019}, {1, 4, 2019}, {7, 4, 2019}, {14, 4, 2019}, {21, 4, 2019}, {7, 5, 2019}, {14, 5, 2019}, {21, 5, 2019}, } int partidos_n = sizeof(partidos) / sizeof(partidos[0]); int entradas = 0; do { printf("\n\n\t Bienvenido! "); printf("\n\n\t seleccione un partido: \n"); for (int i = 0; i < partidos_n; i++) { partidos[partidos_n].showdate2(); } printf("\n\n su eleccion: "); scanf("%d", &eleccion); } while(entras < 19) } -
emShadow created this gist
Nov 19, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,91 @@ #include<stdio.h> main(){ int estadio [19][100]; /* el primer 19 son los 19 partidos, los otrs 100 es el número de socios */ int i, j; int partidos, entradas, entradasocio=19; char socios[100]; int eleccion; do{ printf("\n\n\t Bienvenido! "); printf("\n\n\t seleccione una opcion: \n"); printf("\n 1. Imprimir fecha de partidos "); printf("\n 2. Registrar socio "); printf("\n 3. Imprimir datos "); printf("\n 4. Salir "); printf("\n\n su eleccion: "); scanf("%d", &eleccion); switch(eleccion) { case 1: printf("\n\t Ha elegido ver las fechas de los partidos\n"); printf("1. 1 de mayo \n"); printf("2. 22 de mayo \n"); printf("3. 6 de junio \n"); printf("4. 7 de julio \n"); printf("5. 28 de julio \n"); printf("6. 8 de agosto \n"); printf("7. 11 de septiembre \n"); printf("8. 21 de septiembre \n"); printf("9. 2 de octubre \n"); printf("10. 20 de octubre \n"); printf("11. 8 de noviembre \n"); printf("12. 20 de noviembre\n"); printf("13. 6 de diciembre\n"); printf("14. 3 de enero \n"); printf("15. 6 de febrero \n"); printf("16. 24 de febrero \n"); printf("17. 10 de maro \n"); printf("18. 20 de marzo \n"); printf("19. 1 de abril \n"); break; case 2: printf("Ingrese su nombre: "); scanf("%s", socios); printf("Ingrese Cantidad de partidos que desea asistir: "); scanf("%d", partidos); if (partidos>19) { printf("Límite es 19"); } for (i=0;i<=19;i++){ for(j=0;j<=100;j++){ estadio[i][j]=0; } } for(i=0;i<=partidos;i++) { printf("Ingrese el partido al que desea asistir: "); scanf("%d", &partidos); printf("Ingrese la cantidad de entradas que desea reservar: "); scanf("%d", &entradas); if(partidos>entradas) { printf("solo se permiten 19 entradas"); break; } if(entradasocio=0) { printf("Ha utilizado todas sus entradas"); break; } } case 3: printf("%d",estadio); } /*switch */ } while (eleccion!=4); return 0; }