Курсовая работа: Застосування BORLAND C BUILDER для створення ігрових програм
printf(" Capital City Of India :? ");
printf("\n\n A) NEW DELHI \t\t B) NEW YORK \n C) SYDNEY \t\t D) LONDON ");
scanf(" %[^\n]", dummy);
second = time(NULL);
ret = difftime(second, first);
if( (strcmpi(dummy, "a") == 0) || (strcmpi(dummy, "new delhi") == 0) )
{
printf(" RIGHT ANSWER ");
flag = 1;
}
else
{
printf(" WRONG ANSWER______The Answer Is ---> A / NEW DELHI ");
flag = 0;
}
}
else if(random(20) == 11)
{
first = time(NULL);
printf(" How Many Wonders Are There In This World :? ");
printf("\n\n A) 6 \t\t B) 27 \n C) 8 \t\t D) 7 ");
scanf(" %[^\n]", dummy);
second = time(NULL);
ret = difftime(second, first);
if( (strcmpi(dummy, "d") == 0) || (strcmpi(dummy, "7") == 0) )
{
printf(" RIGHT ANSWER ");
flag = 1;
}