C Program To Find A Percentage Of Marks

Problem :- Write A C Program To Find A Percentage Of Marks .

Logic :- First We take input marks Of All 6 Subject from User ,then we add all subject and after that divide by number or subject 

Formula :- 

Percentage = Sum of all Subject / Number of Subject 

Solution :-

int ph,ch,math,eng,sc,sci;
float per;

printf("Enter The Marks Of Subject ph,ch,math,eng,sc,sci\n");
scanf("%d%d%d%d%d%d" ,&ph,&ch,&math,&eng,&sc,&sci);


printf("\nPercentage = %f\n",per);



C Program To Find A Percentage Of Marks

Previous Post
Next Post

post written by:

Hi, I’m Ghanendra Yadav, SEO Expert, Professional Blogger, Programmer, and UI Developer. Get a Solution of More Than 500+ Programming Problems, and Practice All Programs in C, C++, and Java Languages. Get a Competitive Website Solution also Ie. Hackerrank Solutions and Geeksforgeeks Solutions. If You Are Interested to Learn a C Programming Language and You Don't Have Experience in Any Programming, You Should Start with a C Programming Language, Read: List of Format Specifiers in C.
Follow Me