1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
#include <stdio.h>
#include <iostream>
#include <string.h>
#include <cstdlib>
#include <stdlib.h>
#include <windows.h>
using namespace std;
int muestra(char* asigno1, char* asigno2){
printf("%s\n",asigno1);
system(asigno2);
system("pause");
}
int main(){
int i=1;
char* signo[10][3] = {
{"DANIEL","saturday.pdf","Peches"},
{"MICHELLE","saturday.pdf","Peches"},
{"TELLO","saturday.pdf", "Jokers"},
{"MARTIN","sunday.pdf","Jokers"},
{"RUBEN","sunday.pdf","Kipies"},
{"JOSE","sunday.pdf","Kipies"},
{"JORGE","saturday.pdf","Kipies"},
{"RIGOBERTO","saturday.pdf","Chastra"},
{"MARC","saturday.pdf","Chastra"},
{"RICHARD","sunday.pdf","Chastra"},
};
while(i<10 && i>0){
for(i=0;i<10;i++){
printf(" %2d.- %s\n",i+1,signo[i][0]);}
printf("\n\n\n The nunmber of the student you wanna know is: ");
scanf("%d",&i);
printf("\n\n\n ");
if(i<10 && i>0){
switch(i){
case 1:
muestra(signo[i-1][0],signo[i-1][1]);
break;
case 2:
muestra(signo[i-1][0],signo[i-1][1]);
break;
case 3:
muestra(signo[i-1][0],signo[i-1][1]);
break;
case 4:
muestra(signo[i-1][0],signo[i-1][1]);
break;
case 5:
muestra(signo[i-1][0],signo[i-1][1]);
break;
case 6:
muestra(signo[i-1][0],signo[i-1][1]);
break;
case 7:
muestra(signo[i-1][0],signo[i-1][1]);
break;
case 8:
muestra(signo[i-1][0],signo[i-1][1]);
break;
case 9:
muestra(signo[i-1][0],signo[i-1][1]);
break;
case 10:
muestra(signo[i-1][0],signo[i-1][1]);
break;
}//end of the switch
}else{ printf("this number doesnt exist\n"); system("pause");i=10;}
}
}
|