How To Write a C Program To Calculate Sum of 5 Subjects and Find Percentage in C Programming Language ?
Solution For C Program To Calculate Sum of 5 Subjects and Find Percentage:
#include<stdio.h> #include<conio.h> void main() { int s1,s2,s3,s4,s5,sum,total=500; float per; clrscr(); printf("nEnter marks of 5 subjects : "); scanf("%d%d%d%d%d",&s1,&s2,&s3,&s4,&s5); sum = s1 + s2 + s3 + s4 + s5; printf("nSum : %d",sum); per = (sum * 100) / total; printf("nPercentage : %f",per); getch(); }Output :Enter marks of 5 subjects : 80 70 90 80 80 Sum : 400 Percentage : 80.00
Tags: C Program to calculate sum of 5 subjects and find percentage, c program to find average marks using array, how to calculate percentage of total marks obtained, c++ program to calculate sum of 5 subjects and find percentage, program to show swap of two no's without using third variable, student mark list program in c using array, a program to find the total salary of employee and salary of employee details, write a program to find out area and perimeter of a rectangle, program to reverse a given number.
Learn More :
C Program
- Using Bash to input stuff into c program
- Difficult C Programming Questions
- Write a c program to find largest among three numbers using binary minus operator three numbers using binary minus operator
- PRINTING ASCII VALUE USING C PROGRAM
- MULTIPLICATION OF TWO MATRICES USING C PROGRAM
- FIND OUT SUM OF DIAGONAL ELEMENTS OF A MATRIX USING
- Write A C Program To Find Out Transport Of A Matrix
- Factorial of 100 in C Program
- Multiplication of large numbers in c
- Division of Large Numbers in C Program
- BINARY SEARCH USING C PROGRAM
- BINARY SEARCH THROUGH RECURSION USING C PROGRAM
- FIND FACTORIAL OF A NUMBER USING RECURSION IN C PROGRAM
- FIND GCD OF A NUMBER USING RECURSION IN C PROGRAM
- FIND SUM OF DIGITS OF A NUMBER USING RECURSION USING C PROGRAM
- FIND POWER OF A NUMBER USING RECURSION USING C PROGRAM
- REVERSE A NUMBER USING RECURSION IN C PROGRAM
- SWAP TWO VARIABLES WITHOUT USING THIRD USING C PROGRAM VARIABLE
- Write A C Program For Swapping Of Two Arrays
- SWAPPING OF STRINGS USING C PROGRAM
- CONVERSION FROM DECIMAL TO OCTAL USING C PROGRAM
- CONVERSION FROM DECIMAL TO OCTAL USING C PROGRAM
- CONVERSION OF DECIMAL TO BINARY USING C PROGRAM
- CONVERSION OF FAHRENHEIT TO CENTIGRADE USING C PROGRAM
- C or C++ Program To Find Bonus Amount