Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
// Name, Jag#, Date, File Name
// Assignment 2, Program to enter and calc avg of 5 test scores then display result to screen
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
// Attention CIS210 Students: Replace SouthPaw’s information with your own name/jag#
cout << "1) My name is: SouthPaw" << endl;
cout << "2) My Jag# is: J99999999" << endl;
cout << "3) The last 4 digits of my Jag# is: 9999" << endl;
// Calculate 5 Test Scores
double testScore1;
double testScore2;
double testScore3;
double testScore4;
double testScore5;
cout << "Enter test score 1: ";
cin >> testScore1;
cout << endl;
cout << "Enter test score 2: ";
cin >> testScore2;
cout << endl;
cout << "Enter test score 3: ";
cin >> testScore3;
cout << endl;
cout << "Enter test score 4: ";
cin >> testScore4;
cout << endl;
cout << "Enter test score 5: ";
cin >> testScore5;
cout << endl;
cout << "Average test score: " << (testScore1+testScore2+testScore3+testScore4+testScore5)/5 << endl;
cout << endl;
// when using Visual Studio, use the system/pause command to display the results of your program
// system("pause");
return 0;
}