12. Write a program to read marks from the keyboard and your program should display equivalent grade according to the following table(if else ladder) Marks Grade 100 – 80 Distinction 79 – 60 First Class 59 – 40 Second Class < 40 Fail
#include<stdio.h> ( this applies in the given code )
#include
int main()
{
int marks;
printf(“\n Enter Marks between 0-100 :”);
scanf(“%d”,&marks);
if(marks>100 || marks =80)
{
printf(“\n You got Distinction”);
}
else if(marks>=60)
{
printf(“\n You got First Class”);
}
else if(marks>=40)
{
printf(“\n You got Second Class”);
}
else
{
printf(“\n You got Fail”);
}
return 0;
}