Wednesday, December 3, 2008

A Program that will calculate Your grade in the exam

#include
void main ()
{
int marks,
printf ("How much (% %)number you get:");
scanf ("%d", & marks);
if (marks>=80)
printf ("You get A+\n");
else if (marks>=75)
printf ("You get A\n");
else if (marks>=70)
printf ("You get A-\n");
else if (marks>=65)
printf ("You got B+\n");
else if (marks>=60)
printf ("You got B\n");
else if (marks>=40)
printf ("You got D\n");
else
printf ("You got F\n");
}

No comments: