daily pastebin goal
83%
SHARE
TWEET

Untitled

a guest Jan 12th, 2018 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
Top