C++ Program to Calculate Average Percentage Marks1 min read

In this tutorial, you will learn to write a code on how to calculate the average percentage marks in C++. You may go through the following topics in C++:

We will do calculate the total marks, average, and then the percentage of the subjects entered by the user. The program also takes the user input for the marks obtained in the subjects.

How to find the average and Percentage of marks?

Total Marks = Sum of the marks of all subjects
Average Marks = Total Marks/No. of subjects
Percentage = ((marks obtained)/(total marks) *100)


C++ Program to find Total, Average and Percentage Marks

Output:

Enter the number of subjects: 5
Enter marks on each subject:
84
67
62
80
76
Total Marks Obtained: 369
Average Marks: 73.8
Percentage: 73.8

Here, the total marks are taken as 100 on each subject, you may take the total marks from the users too.


MORE

String Pattern Programs in C

In this tutorial, we will write various C pattern programs for String. Before that, you may go through the following topics in C. for loop …
Read More

Java Program to Find pair of Integers in Array whose sum is given Number

In this tutorial, we will write a program to find a pair of elements from an array whose sum equals a given number in java …
Read More

Program to Print Diamond Alphabet Patterns in C

In this tutorial, we will learn to write a C program to print Diamond patterns using alphabets/characters. However, in this tutorial, we will create a …
Read More

Half Diamond Pattern in C using Alphabets

In this tutorial, we will learn and code the half diamond alphabet patterns in C programming language. However, in this tutorial, we will create a …
Read More

Half Pyramid of Alphabets in C

In this tutorial, we will learn and code alphabet patterns in C programming language specifically the Half pyramid of alphabets in C programming. However, in …
Read More

Inverted Half Pyramid Pattern of Alphabets in C

In this tutorial, we will write a C program to print half Pyramid using alphabets/characters. Before that, you may go through the following topic in …
Read More