Курсовая работа: Застосування BORLAND C BUILDER для створення ігрових програм
flag = 0;
}
}
else if(random(20) == 4)
{
first = time(NULL);
printf(" The Fastest Running Mammal On This Planet [EARTH] :? ");
printf("\n\n A) CHEETAH \t\t B) CAMEL \n C) MAN \t\t D) ELEPHANT ");
scanf(" %[^\n]", dummy);
second = time(NULL);
ret = difftime(second, first);
if( (strcmpi(dummy, "a") == 0) || (strcmpi(dummy, "cheetah") == 0) )
{
printf(" RIGHT ANSWER ");
flag = 1;
}
else
{
printf(" WRONG ANSWER______The Answer Is ---> A / CHEETAH ");
flag = 0;
}
}
else if(random(20) == 5)
{
first = time(NULL);
printf(" Which Of These Is An Output Device :? ");
printf("\n\n A) SCANNER \t\t B) PRINTER \n C) KEY BOARD \t\t D) MOUSE ");
scanf(" %[^\n]", dummy);
second = time(NULL);