WAP to Enter grade secured by A, B,C. count each grade secu by students Display the counter with prope message(GW BASIC)
Answers
Answered by
0
#include<stdio.h>
void main()
{
int marks;
printf("Enter your marks ");
scanf("%d",&marks);
if(marks<0 || marks>100)
{
printf("Wrong Entry");
}
else if(marks<50)
{
printf("Grade F");
}
else if(marks>=50 && marks<60)
{
printf("Grade D");
}
else if(marks>=60 && marks<70)
{
printf("Grade C");
}
else if(marks>=70 && marks<80)
{
printf("Grade B");
}
else if(marks>=80 && marks<90)
{
printf("Grade A");
}
else
{
printf("Grade A+");
}
}
Output :
Enter your marks: 67
Garde C
Similar questions