I need help in C++. I'm trying to figure out how to detect if a number entered by the user is an integer.
BTW we can't have equations in IF statements.
I don't know how to go about this or what to do from here.
Code://Chris Taylor //2/6/06 (0010/0001/0110) //Terminal 2 //Integer Recognition Program //Standard header files #include <iostream.h> #include <conio.h> #include <fstream.h> #include <string.h> #include <iomanip.h> int main() { ofstream outfile ("IntegerProgram.txt"); //Creates textfile cout << "This is the semi-godlike Integer Detection Program. It will allow you to enter a number, then determine if the entered number is an intege.\n"; float integer; int remainder; cout << "Please enter your number: "; cin >> integer; remainder = integer/2; cout << remainder; getch(); return 0; }