Write a c program to print the grade of a suitable based on marks

 Write a c program to print the grade of a suitable based on marks :

//Grade a-90 to 100
//Grade b-80
// Grade c=70
//Grade d=60
//Grade border pass >=35
//Grade failed<35

Answer code :

#include<stdio.h>
int main()
{
int marks;
printf("Enter the marks 1 to 100");
scanf("%d", &marks);
switch(marks /100)
{
Case 9||<9:
printf(" Grade A");
break;

Case 8:
printf(" Grade B");
break;

Case 7:
printf(" Grade C");
break;

Case 6:
printf(" Grade D");
break;

Case 5:
printf(" Grade E");
break;

default :
printf(" Grade FAILED");
break;
}
}





Thanks   you   for   reading .   For   more   knowledge   click   here

 Learning C programming language from basics concept include with PROGRAMS:

 https://kodewithgy.blogspot.com/2024/09/learning-c-programming-language-from.html


Post a Comment

Please Select Embedded Mode To Show The Comment System.*

Previous Post Next Post