For some reason, after I input 'Y' or 'N' its still showing me th error from the if statement. Am i doing something wrong in the toupper function? or is it the if statement? Sorry I am new to C++
#include <iostream>
#include <cstdlib>
#include <iomanip>
#include <string>
#include <cctype>
usingnamespace std;
#define storepercent = 0.8
//Declaring other functions other than main
void storeCalculations(double, double);
int main()
{
//Holds the user's input
string ISBN;
double pricepercopy;
char requiredorsugg, neworold;
int classsize;
//Asks for the User's Input
cout << "What is the ISBN?" << endl;
cin >> ISBN;
cout << "What is the price per copy?" << endl;
cin >> pricepercopy;
cout << "What is the class size?" << endl;
cin >> classsize;
cout << "Is the book required or suggested? (Y/N): " << endl;
cin >> requiredorsugg;
requiredorsugg = toupper(requiredorsugg);
if (requiredorsugg != 'Y' || requiredorsugg != 'N')
{
cout << "ERROR: Must type Y or N" << endl;
system("pause");
exit(100);
}
cout << "Is the required or suggested book will be new or old? (N / O):" << endl;
cin >> neworold;
neworold = toupper(neworold);
if (neworold != 'N' || neworold != 'O')
{
cout << "ERROR: Must type 'N' or 'O'" << endl;
system("pause");
exit(100);
}
}