#include%26lt;stdio.h%26gt;
main()
{
int a=0, b=0, c, d, e;
clrscr();
for (c=1; c%26lt;=10; c++)
{
printf("%d + %d = ", c, c);
scanf("%d",%26amp;d);
e=c+c;
if (d==e)
{
printf("Right!\n");
a++;
}
else
{
printf("Sorry your answer is wrong. The answer is %d\n", e);
b++;
}
}
printf("\nThe total right answer(s) is %d", a);
printf("\nThe total wrong answer(s) is %d", b);
getch();
}
this program add numbers up to 10...
how can i add a filter that will end the program if i type an alphabet ???
tnx C masters!!!
Help in C regarding in filtering?
This question is an exact duplicate of the question below.
song downloads
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment