i already have my whole program working how im suppose to, however, theres this part im trying to determine if its true or false with an if statement and that if its false to go on and do the rest of the program.
this is the beginning of the program, i want to know if its legal to put a while loop after an if and else statement , because the compiler gives me an error.
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
int id, Students;
double rright, wrong, Tanswered, Omitted, Grade, Total, Percent;
cout << "Enter ID with right and wrong answers followed by spaces and press enter: " << endl;
cin >> id >> rright >> wrong; //read id with right and wrong answers
if (rright >= 51) { //determines if theres more than 50 questions answered and to print error
cout << endl << "This is an error, you cant have more than 50 questions right, please try again" << endl << endl;
else
cin >> id >> rright >> wrong;
while (id != -1)
{
Tanswered = rright + wrong;
as i said this is the beginning of the program, where you see the else, i want to know if its possible to put it there