Write a C program for Calculation of percentage of a Student whose marks of Physics, chemistry, math,English and Hindi is Entered by User
Program:-
#include <stdio.h>
#include <conio.h>
void main()
{
float P, C, M, E, H, D;
clrscr();
printf("Enter the marks obtained by the student in each subjects");
scanf("%f%f%f%f%f",&P,&C,&M,&E,&H);
D=(P+M+C+H+E)/5;
printf("%f", D);
getch();
}
Output:-
input:-
Enter the value of r and h
P=?
C=?
M=?
E=?
H=?
Enter the value of r and h
P=?
C=?
M=?
E=?
H=?
output:-
...
...
0 comments:
Post a Comment