Created
September 13, 2018 16:16
-
-
Save LokeshKumarES/67e690f55e065e269d6cfd67f5757127 to your computer and use it in GitHub Desktop.
Write a C program to find the sum and percentage of marks.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<conio.h> | |
void main() | |
{ | |
int ma, en, ph, ch, cs; | |
float sum, per; | |
printf("Enter the marks of Maths= "); | |
scanf("%d", &ma); | |
printf("Enter the marks of English= "); | |
scanf("%d", &en); | |
printf("Enter the marks of Physics= "); | |
scanf("%d", &ph); | |
printf("Enter the marks of Chemistry= "); | |
scanf("%d", &ch); | |
printf("Enter the marks of Computer_Science= "); | |
scanf("%d", &cs); | |
sum = ma+en+ph+ch+cs; | |
per=(sum)/5; | |
printf("The Percentage marks obtained= %f", per); | |
getch(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment