Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. /*
  2.  
  3. author: sir Amer Ali AL-Kindi
  4. department: Mechatronics.
  5. */
  6. #include <iostream>
  7. using namespace std;
  8.  
  9. int main(){
  10. double num1, num2, num3,sum,everage;
  11.  
  12. int subject1, subject2, subject3 ;
  13. cout<<"This program will computer for the total and everage of three (3) marks\n";
  14. cout<<"\n";
  15. cout<<"\n";
  16. //input
  17.  
  18. cout<< "Enter mark 1:";
  19. cin>>num1;
  20.  
  21. cout<< "Enter mark 2:";
  22. cin>>num2;
  23.  
  24. cout<< "Enter mark 3:";
  25. cin>>num3;
  26. cout<<"\n";
  27. cout<<"\n";
  28.  
  29. //process
  30.  
  31. //output
  32. cout <<"--------------------------------\n";
  33. cout<<"your total is:"<<num1+num2+num3<< endl;
  34. cout <<"--------------------------------\n";
  35. cout<<" \n";
  36. //output
  37. sum=num1+num2+num3;
  38. cout<<"--------------------------------\n";
  39. cout<<"your everage is:"<<sum/3<<endl;
  40. cout <<"--------------------------------\n";
  41. cout<<" \n";
  42. return 0;
  43.  
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement