Good afternoon,

Ive searched on alot of website for this but allways came with diffrent results but never the answer for my problem. Im sure there must be an really easy way to solve this. Im just new in c++ so bare with me, actually started last week.

My problem is:

I want the user to put in a number. Like this:

cout << " Give a number: ";

cin >> number;

Then I got an other variable called number2. Number2 is allways number minus 1. So

number2 = number - 1;

Now I devide number by number 2 and get an result. For example if number is 5, number2 is 4 so result is 1.25. The result I stored in an other float variable (a). Now I wanne check if a is a integer number or not.

In php theres an really easy solution for this: is_integer($a); , Unfortuantly I havent found such function in c++.

I hope ive made my problem clear. Thanks in advance

- Adoro