#include<iostream>
#include<math.h>
using namespace std;
int main()
{
cout<<"****BY DRIODHAN RATHIORE ***"<<endl;
double a,b,c,d,x;
cout<<"enter the marks of maths ="<<endl;
cin>>a;
cout<<"enter the marks of physics ="<<endl;
cin>>b;
cout<<"enter the marks of chemistry ="<<endl;
cin>>c;
cout<<"enter the marks of English ="<<endl;
cin>>d;
x=(a+b+c+d)*100/400;
cout<<"the total percetange ="<<x;
return 0;
}
#: Welcome once again on sitesbay, today we discuss about how to write code for calculate percentage of marks program in C++. For calculate percentage of marks obtained by student, divide total marks by number of subject ( percentage=total marks / number of subject ).
0 Comments