|
|
@ -9,9 +9,9 @@ char answers[NUM_QUESTIONS] = {'B', 'A'}; |
|
|
|
int* randomNumber() { |
|
|
|
srand(time(NULL)); |
|
|
|
int k = 0, p; |
|
|
|
static int arr[10]; |
|
|
|
while(k<10){ |
|
|
|
int num =rand()%10; |
|
|
|
static int arr[11]; |
|
|
|
while(k<11){ |
|
|
|
int num =rand()%11; |
|
|
|
for (p = 0; p < k; p++){ |
|
|
|
if(arr[p]==num){ |
|
|
|
break; |
|
|
@ -106,6 +106,7 @@ void fifty_fifty(int question_num) { |
|
|
|
"C.Toronto\nD.Ottawa", |
|
|
|
"A.Egypt\nB.Mexico", |
|
|
|
"A.Surat Thani\nB.Bangkok", |
|
|
|
"B.Mexico\nC.USA", |
|
|
|
}; |
|
|
|
printf("%s\n",qC[question_num]); |
|
|
|
} |
|
|
@ -236,7 +237,7 @@ void ask_questions(void) { |
|
|
|
"What is the capital of Canada?\n", |
|
|
|
"What country are the Great Pyramids of Giza located in?\n", |
|
|
|
"What is the capital of Thailand?\n", |
|
|
|
|
|
|
|
"In which country was Frida Kahlo born?\n", |
|
|
|
}; |
|
|
|
char qC[][100] = {//6 |
|
|
|
"A.Mount Everest\nB.Uludag\nC.K2\nD.Makalu", |
|
|
@ -249,6 +250,7 @@ void ask_questions(void) { |
|
|
|
"A.Vancouver\nB.Montreal\nC.Toronto\nD.Ottawa", |
|
|
|
"A.Egypt\nB.Mexico\nC.Iceland\nD.Greenland", |
|
|
|
"A.Surat Thani\nB.Bangkok\nC.Phuket\nD.Pattaya City", |
|
|
|
"A.Austria\nB.Mexico\nC.USA\nD.India", |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
@ -264,6 +266,7 @@ void ask_questions(void) { |
|
|
|
'D', |
|
|
|
'A', |
|
|
|
'B', |
|
|
|
'B', |
|
|
|
}; |
|
|
|
|
|
|
|
int* arr = randomNumber(); |
|
|
@ -397,6 +400,7 @@ void hint(int question_num) { |
|
|
|
"Hint:It is the 4th largest city in Canada.", |
|
|
|
"Hint:It is a dry Country.", |
|
|
|
"Hint:The capital has the longest city name in the world.", |
|
|
|
"Hint:The Native language is Spanish.", |
|
|
|
}; |
|
|
|
printf("%s\n",qC[question_num]); |
|
|
|
} |
|
|
|