Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- int main() {
- int a;
- while (true)
- {
- if (std::cin >> a) {
- continue;
- }
- else {
- std::cout << "Input is not a number" << std::endl;
- break;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement