Using only cin, cout and their related commands, write code to receive
input from the user and print either real or integer, depending on whether the
user entered a real number (e.g., 14.7) or an integer (e.g., 14).you can assume that the input is either a real number or an integer. You are not to use the peek function.
i tired cin.fail(), buts its no use since it won't give me a flag when i tried to read as an integer.