===========================================================================
CODING
#include<all.h>
void main()
{
label:
clrscr();
int a,b,c;
randomize();
a=random(100);
delay(450);
b=random(100);
gotoxy(5,5);
printf("Enter the sum of %d and %d: ",a,b);
scanf("%d",&c);
if(c==a+b)
{
gotoxy(5,6);
printf("GOOD MATHS!");
}
else
{
gotoxy(5,6);
printf("Wait.... Restarting the Program");
delay(10000);
goto label;
}
getch();
}
CODING
#include<all.h>
void main()
{
label:
clrscr();
int a,b,c;
randomize();
a=random(100);
delay(450);
b=random(100);
gotoxy(5,5);
printf("Enter the sum of %d and %d: ",a,b);
scanf("%d",&c);
if(c==a+b)
{
gotoxy(5,6);
printf("GOOD MATHS!");
}
else
{
gotoxy(5,6);
printf("Wait.... Restarting the Program");
delay(10000);
goto label;
}
getch();
}
===========================================================================
No comments:
Post a Comment