Description:
This program in used to print grade of subject according to marks obtained by student.this program can be created by using else..if ladder.
Program:
#include<stdio.h>
#include<conio.h>
main()
{
int A;
clrscr();
printf("Marks obtained in Any Subject: ");
scanf("%d",&A);
if(A>=80<=100)
{
printf("\nGrade is A");
}
else if(A>50&&A<80)
{
printf("\nGrade is B");
}
else
{
printf("\nGrade is C Fail");
}
getch();
}
This program in used to print grade of subject according to marks obtained by student.this program can be created by using else..if ladder.
Program:
#include<stdio.h>
#include<conio.h>
main()
{
int A;
clrscr();
printf("Marks obtained in Any Subject: ");
scanf("%d",&A);
if(A>=80<=100)
{
printf("\nGrade is A");
}
else if(A>50&&A<80)
{
printf("\nGrade is B");
}
else
{
printf("\nGrade is C Fail");
}
getch();
}