Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- int m1,m2,m3,m4,m5,total;
- float average;
- cout<<"enter the marks of 5 subjects:"<<endl;
- cin>>m1>>m2>>m3>>m4>>m5;
- total=m1+m2+m3+m4+m5;
- cout<<"total marks:"<<total<<endl;
- average=total/5;
- cout<<"average:"<<average<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement