Computer Science, asked by ghoshrwitrij2009, 1 day ago

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 r27272278
0

\huge\fcolorbox {magenta} {pink} {Hey mate here is the answer}

#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