// reads in 5 scores and show how much each \ // score differs from the highest score. // Walt Savitch // 02/24/00 #include using namespace std; int main( ) { int score[5], max; cout << "Enter 5 scores:\n"; cin >> score[0]; max = score[0]; for (int i = 1; i < 5; i++){ cin >> score[i]; if (score[i] > max) max = score[i]; // max is the largest } cout << "The highest score is " << max << endl << "The scores and their\n" << "differences from the highest are:\n"; for (int i = 0; i < 5; i++) cout << score[i] << " off by " << (max - score[i]) << endl; }