i tried to do something like this in one of the program i made....
if the user entered something that is not the same with the number and the word that are available in the program,it will ask the user to enter the input again..
But the problem is that the loop is continuing in my program even if i enter the correct word or number..
how to fix this simple problem?
#include <iostream>
using namespace std;
int main ()
{
string test;
do {
cout<<"enter the input :";
cin>>test;
}while (test<"1" || test>"5" || test !="a" || test!="b");
}