i want to create a loop to generate a random question

i want to create a loop to generate a random question,user answers,user answer be checked with true answer,if true,true++,else,false++.and next question to 10.and instead of strcasecmp,what shuold i do in c++?hee is my code:

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include<string.h>
void main()
{
clrscr();

int true=0,false=0;
char useranswer[10];
char question[200][200];
strcpy(question[0],"1.Which planet is closest to the sun?");
strcpy(question[1],"2.At the start of a game of chess, who moves first?");
strcpy(question[2],"3.Which is the tallest mountain in the world?");
strcpy(question[3],"4.In which country is the Louvre Museum?");
strcpy(question[4],"5.How is the number 5 written in Roman numerals?");
strcpy(question[5],"6.True or False: All polar bears are left-handed?");
strcpy(question[6],"7.Which fruit gave its name to a desk top computer in 1984?");
strcpy(question[7],"8.How many Godfather films have been made?");
strcpy(question[8],"9.What colour do you add to blue to make it green?");
strcpy(question[9],"10.What is the capital city of Spain?");

char answer[200][200];
strcpy(answer[0],"Mercury");
strcpy(answer[1],"White");
strcpy(answer[2],"Everest");
strcpy(answer[3],"France");
strcpy(answer[4],"V");
strcpy(answer[5],"True");
strcpy(answer[6],"Apple");
strcpy(answer[7],"Three");
strcpy(answer[8],"Yellow");
strcpy(answer[9],"Madrid");

for(int i=0;i<10;i++)
{
for(int j=0;j<10;j++)
{
for(int k=0;k<10;k++)
{
srand ( time(NULL) );
int RandIndex = rand() % 10;
puts(question[RandIndex]);
useranswer[j]=getche();
if(strcasecmp(useranswer,answer)==0)
{
true++;
gotoxy(2,2);
cout<<useranswer[j]<<endl<<endl<<endl;
}
else
{
false++;
gotoxy(2,2);
cout<<useranswer[j]<<endl<<endl<<endl;
}
}}}
getch();
}
Topic archived. No new replies allowed.