• int test3; // Score for
third test
• bool dataOK; // True if data
is correct
•
• cout << fixed <<
showpoint; // Set up
floating pt.
• // output format
• // Get data
• cout << "Enter a Student ID
number and three test scores:"
• << endl;
• cin >> studentID >> test1
>> test2 >> test3;
• cout << "Student number:
" << studentID << "
Test Scores: "
• << test1 << ",
" << test2 << ", " << test3 <<
endl;
•
• // Test data
• if (test1 < 0 || test2 < 0
|| test3 < 0)
• dataOK = false;
• else
• dataOK = true;