C++ (negative verification is not working
问题 Testing cin for non numeric, non zero,and non negative values and entering loop. Cannot see why the test for values <=0 portion is not working. it should output: cout << "Invalid value input\n"; Thanks in advance for catching what is probably a silly error. #include <iostream> using namespace std; int main() { unsigned int integer; cout<< "Enter a non negative number greater than 0: "; cin>> integer; do { while(!cin || integer <= 0)//validation condition { cout << "Invalid value input\n"; cin