Thursday, July 25, 2019

c programing in Enter your marks to know your grade.

C programing  in Enter your marks to know your grade:

check your marks to know your grade.



//Enter Your Marks And know to your grade.


#include<stdio.h>
#include<conio.h>

void main()
{
int marks;
clrscr();
printf("Enter marks to know your grade:-");
scanf("%d",&marks);

if(marks<35)
{
printf("Fail");
}
else if(marks>=35 && marks<40)
{
printf("grade C");
}
else if(marks>=40 && marks<60)
{
printf("grad B");
}
else if(marks>=60 && marks<80)
{
printf("grad A");
}
else
{
printf("grade A+");
}
getch();
}


Output:



EmoticonEmoticon