C Program
Q1) . C Program to find grade of a student code
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();
}
Q 1). C Program to find grade of a student code
Explanation:-
- 100 To 70 :- destinction
- 60 To 69 :- First Class
- 50 To 59 :- Second Class
- 40 To 49 :- Third Class
- fail
Q 1) .C Program to find grade of a student code.
Program Output :-Run 1 Time
Enter Marks :- 98
Destinction
Q1 ). C Program to find grade of a student code
Program Output :-Run 2 Time
No comments:
Post a Comment