#include <iostream>
using namespace std;
int main ()
{
float s1,s2,s3,s4,s5;
float agg, percentage;
cout<<" Program to calculate aggregate & Percentage of marks \n\n";
cout<<" gained by student in five different subjects out of 100 \n";
cout<<" Enter The marks of first Subject \n";
cin>> s1;
cout<<" Enter The marks of Second Subject \n";
cin>> s2;
cout<<" Enter The marks of Third Subject \n";
cin>> s3;
cout<<" Enter The marks of Fourth Subject \n";
cin>> s4;
cout<<" Enter The marks of Fifth Subject \n";
cin>> s5;
agg=s1+s2+s3+s4+s5;
cout<<"\n Aggrigate is \n";
cout<< agg;
percentage=(s1+s2+s3+s4+s5)/500*100;
cout<<"\n percentage is \n";
cout<< percentage;
return 0;
}
No comments:
Post a Comment
Must drop your comments about post.