Reputation: 13
I have to make a test where a number has to be the multiple of 500,
do{
cout << "Input Price[price>0|price multiple of 500]: ";
cin >> price;
cin.sync(); cin.clear();
} while (price<1 || price>5000);
The code is still incomplete, I just have to add the following validation left. What do I do?
and also what is the right term for that kind of validation? I had a hard time determining the title.
Upvotes: 1
Views: 111