1using namespace std;
2
3bool isNumber(const string& s)
4{
5 string::const_iterator it = s.begin();
6 while (it != s.end() && isdigit(*it)) ++it;
7 return !s.empty() && it == s.end();
8}
1num = input("Enter your number ")
2
3print("\n")
4if num.isdigit():
5 print("User input is Number ")
6else:
7 print("User input is string ")