-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmarks.c
33 lines (28 loc) · 807 Bytes
/
marks.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <stdio.h>
#include <conio.h>
int main()
{
float english;
float maths;
float physics;
float chemistry;
float civics;
float total;
float percentage;
printf("Enter marks obtained in English\n");
scanf("%f", &english);
printf("Enter marks obtained in Mathematics\n");
scanf("%f", &maths);
printf("Enter marks obtained in Physics\n");
scanf("%f", &physics);
printf("Enter marks obtained in Chemistry\n");
scanf("%f", &chemistry);
printf("Enter marks obtained in Civics\n");
scanf("%f", &civics);
total = english + maths + physics + chemistry + civics;
percentage = (total/500) * 100;
printf("Total - %f\n", total);
printf("Percentage - %f", percentage);
getch();
return 0;
}