Program to calculate sum of 5 subjects and find percentage
C Programming Language / Overview of C Language
1364Program:
/* Documentation Section Program to calculate sum of 5 subjects and find percentage. author: atnyla developer */ #include #include void main() { int s1,s2,s3,s4,s5,sum,total=500; float per; printf("enter marks of 5 subjects: \n"); scanf("%d%d%d%d%d",&s1,&s2,&s3,&s4,&s5); sum=s1+s2+s3+s4+s5; printf("sum=%d",sum); per=(sum*100)/total; printf("percentage=%f \n",per); }
Output:
Explanation:
This Particular section is dedicated to Programs only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.
# C Tutorials
# JAVA Tutorials
# HTML Tutorials
# Computer Fundamental
# Data Structure
# DBMS Tutorials
SQL
# C# Language
# R Language
# PHP
# Python
# Vue JS