#include #include using namespace std; int main(void) { string input; int num; cout<<"enter a number:"; cin>>input; try { //try to convert string to int num=stoi(input); //converts string "12" or "12x" to the integer 12, "2.5" to 2, but "$12" throws error cout<