c program to find grade of a student code example

                                      C Program 

c program  to find grade of a student code example  

Example :



#include<stdio.h>
#include<conio.h>
void main()
{
int marks;
clrscr();
printf("Enter Marks");
scanf("%d",&marks);

if((marks<100)&&(marks>70))
{
printf("Destinction");
}


else if((marks>60)&&(marks<69))
{
printf("First Class");
}
else if((marks>=50)&&(marks<59))
{
printf("Second Class");
}
else if((marks>=40)&&(marks<=49))
{
printf("Third Class");
}
else{
printf("Fail");
}
getch();
}


C program to find grade of a Student 

Explanation:-

  1. 100 To 70  :- destinction
  2. 60  To  69  :- First Class
  3. 50 To  59   :- Second Class
  4. 40 To  49   :- Third Class
  5. fail

C program to find grade of a Student 

Program Output :

Enter Marks :- 98
Destinction

Related Post :-

Project home page html and CSS

Comments

Popular posts from this blog

how to add background image in html.

HTML pre tag

How to insert image in html

Html anchor tag

Inline css in html