I need to create a if else statement to check multiple model numbers (200+)... How can i build this? I basically want the user to enter their model number and if its on the list they get a approved or denied message.
So far I have this, the "if(model == 9002||1002)" doesnt seem right, it needs to basically check 200+ model numbers... am I even on the right track?
Code:#include <iostream> using namespace std; int main(){ int model; cout << "Enter model" << endl; cin >> model; if(model == 90||100) { cout << "Model Approved" << endl; } else { cout << "Model Denied" << endl; } return 0; }




Reply With Quote