#include <iostream>
#include <string>
std::string input;
std::getline(std::cin, input);
if(!(input.find_first_not_of("0123456789") == std::string::npos)){
cout << "ERROR" << endl;
cin.clear();
}
int entered = stoi(input);
No comments:
Post a Comment
With great power comes great responsibility