Code:
float myInput;
cin >> myInput;
if(myInput == (int)myInput)
        cout << "You entered the integer " << myInput;