Guest User

Untitled

a guest
Jan 12th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main( )
  6. {
  7. int mark1, mark2, mark3,;
  8. float average;
  9.  
  10. //Input the three marks
  11. cout << "Enter the values of the tree marks" << endl;
  12. cin >> mark1 >> mark2 >> mark3;
  13.  
  14. //Calculate the sum and average
  15. average = float(mark1 + mark2 + mark3) / 3;
  16. cout << "The average is " << average << endl;
  17. system("PAUSE");
  18. return EXIT_SUCCESS;
  19. }
Add Comment
Please, Sign In to add comment