Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- author: sir Amer Ali AL-Kindi
- department: Mechatronics.
- */
- #include <iostream>
- using namespace std;
- int main(){
- double num1, num2, num3,sum,everage;
- int subject1, subject2, subject3 ;
- cout<<"This program will computer for the total and everage of three (3) marks\n";
- cout<<"\n";
- cout<<"\n";
- //input
- cout<< "Enter mark 1:";
- cin>>num1;
- cout<< "Enter mark 2:";
- cin>>num2;
- cout<< "Enter mark 3:";
- cin>>num3;
- cout<<"\n";
- cout<<"\n";
- //process
- //output
- cout <<"--------------------------------\n";
- cout<<"your total is:"<<num1+num2+num3<< endl;
- cout <<"--------------------------------\n";
- cout<<" \n";
- //output
- sum=num1+num2+num3;
- cout<<"--------------------------------\n";
- cout<<"your everage is:"<<sum/3<<endl;
- cout <<"--------------------------------\n";
- cout<<" \n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement