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