Skip to content

Instantly share code, notes, and snippets.

@rcstr
Forked from emShadow/examenparcial2.cpp
Last active November 19, 2019 04:41
Show Gist options
  • Save rcstr/fd72285facebe9f0bb357d20fc294c00 to your computer and use it in GitHub Desktop.
Save rcstr/fd72285facebe9f0bb357d20fc294c00 to your computer and use it in GitHub Desktop.
Examen parcial 2
#include<stdio.h>
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",
}
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++) {
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)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment