1
0
Fork 0
SDEV-240-81/week-04/testNum.cpp

20 lines
475 B
C++

// Lab 4 testNum.cpp
// This program checks to see if a test score is equal to 100.
// It currently contains a logic error.
// PUT YOUR NAME HERE.
#include <iostream>
using namespace std;
int main()
{
int score = 65; // Initialize student's test score
if (score == 100)
cout << "You made a perfect score.\n";
else if (score != 100)
cout << "You needed " << 100 - score
<< " more points for a perfect score.\n";
return 0;
}