Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. /*
- 2.
- 3. author: Mohammed Rashed alshehhi
- 4. department: mechatronics.
- 5. */
- 6. #include <iostream>
- 7. using namespace std;
- 8.
- 9. int main(){
- 10. int sum,everage;
- 11. int num1, num2, num3 ;
- 12.
- 13. int subject1, subject2, subject3 ;
- 14. cout<<"This program will computer for the total and everage of three (3) marks\n";
- 15. cout<<"\n";
- 16. cout<<"\n";
- 17. //input
- 18.
- 19. cout<< "Enter mark 1:";
- 20. cin>>num1;
- 21.
- 22. cout<< "Enter mark 2:";
- 23. cin>>num2;
- 24.
- 25. cout<< "Enter mark 3:";
- 26. cin>>num3;
- 27. cout<<"\n";
- 28. cout<<"\n";
- 29.
- 30. //process
- 31.
- 32. //output
- 33. cout <<"--------------------------------\n";
- 34. cout<<"your total is:"<<num1+num2+num3<< endl;
- 35. cout<<" \n";
- 36. //output
- 37.
- 38. coutn";
- 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