Advertisement
Guest User

Untitled

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