Formula: Average=Obtain Marks * 100 / Total Marks will be used in this program to find Average of marks in C++
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
#include<iostream> using namespace std; int main() { float total,obt,avg; cout<<"Enter Your Obtained Marks : "; cin>>obt; cout<<"Enter Your Total Marks : "; cin>>total; avg=obt*100/total; cout<<"Your Average is : " <<avg; return 0; } |
Output:

C++ Program to Find Average of Marks Code

C++ Program to Find Average of Marks