trying to a loop until the user enters 0.0 to terminate the loop. however i get an error. The user should enter the gpa and score until he is done to terminate. Any help?
#include <iostream>
using namespace std;
int main() {
double gpa; // gets the double entered by the user
int score; // gets to store the score
bool done = false;
// statements to print to the user
while (!done) {
cout << "Please enter your GPA(enter 0.0 to end): ";
cin >> gpa;
cout << "Please enter your entrance score: ";
cin >> score;
// the if statements
if (gpa >= 3.7 && score >= 32) {
cout << "Congratulations!. You are hereby admitted to ABC Medical University";
}
else if (gpa < 3.7) {
cout << "you are denied";
}
else if (gpa == 0.0)
done = true;
}// end while loop
return 0;
}