Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main( )
- {
- int mark1, mark2, mark3,;
- float average;
- //Input the three marks
- cout << "Enter the values of the tree marks" << endl;
- cin >> mark1 >> mark2 >> mark3;
- //Calculate the sum and average
- average = float(mark1 + mark2 + mark3) / 3;
- cout << "The average is " << average << endl;
- system("PAUSE");
- return EXIT_SUCCESS;
- }
Add Comment
Please, Sign In to add comment