|
|
@ -9,9 +9,9 @@ |
|
|
|
int* randomNumber() { |
|
|
|
srand(time(NULL)); |
|
|
|
int k = 0, p; |
|
|
|
static int arr[4]; |
|
|
|
while(k<4){ |
|
|
|
int num =rand()%4; |
|
|
|
static int arr[5]; |
|
|
|
while(k<5){ |
|
|
|
int num =rand()%5; |
|
|
|
for (p = 0; p < k; p++){ |
|
|
|
if(arr[p]==num){ |
|
|
|
break; |
|
|
@ -151,7 +151,7 @@ int k = 0; |
|
|
|
printf("\t\t--------------------Round 2-------------------\n\n"); |
|
|
|
printf(">>In this round you need to answer 2 questions correctly to move to Round 3<<\n\n"); |
|
|
|
|
|
|
|
initial = 1, end = 2; |
|
|
|
initial = 1, end = 3; |
|
|
|
printOutOption(qS,qC,aS,initial,end,randArr); |
|
|
|
} |
|
|
|
|
|
|
@ -162,7 +162,7 @@ int k = 0; |
|
|
|
printf("\t\t--------------------Round 3-------------------\n\n"); |
|
|
|
printf(">>In this round you need to answer 2 questions correctly to move to Round 4<<\n\n"); |
|
|
|
|
|
|
|
initial = 2, end = 4; |
|
|
|
initial = 3, end = 5; |
|
|
|
printOutOption(qS,qC,aS,initial,end,randArr); |
|
|
|
|
|
|
|
} |
|
|
@ -181,6 +181,7 @@ void ask_questions(void) { |
|
|
|
"Which country has the largest population in the world??\n", |
|
|
|
"What is the name of the longest river in Africa?\n", |
|
|
|
"What American city is the Golden Gate Bridge located in?\n", |
|
|
|
"What is the capital of Mexico?\n", |
|
|
|
|
|
|
|
}; |
|
|
|
char qC[][100] = {//6 |
|
|
@ -188,6 +189,7 @@ void ask_questions(void) { |
|
|
|
"A.USA\nB.China\nC.Russia\nD.India", |
|
|
|
"A.Missisipi River\nB.Yangtze River\nC.Amazon River\nD.The Nile River", |
|
|
|
"A.San Fransisco\nB.San Diego\nC.New York\nD.Los Angeles", |
|
|
|
"A.Oaxaca\nB.Puebla\nC.Merida\nD.Mexico city", |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
@ -197,6 +199,7 @@ void ask_questions(void) { |
|
|
|
'B', |
|
|
|
'D', |
|
|
|
'A', |
|
|
|
'D', |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
@ -285,6 +288,7 @@ void hint(int question_num) { |
|
|
|
"Hint:It's population is 1.412 billion.", |
|
|
|
"Hint:The longest river measures 6,650km.", |
|
|
|
"Hint:The Golden States Warriors play there.\n", |
|
|
|
"Hint:It is one of the oldest and largest cities in the Americas.\n", |
|
|
|
}; |
|
|
|
printf("%s\n",qC[question_num]); |
|
|
|
} |
|
|
|