Thanks for that info people but I think you miss taken me,
Im after a way of checking a float if it has a decimal point in it or not
So I a can pass the input to the next stage!!!
If int as decimal or else
p.s still learning how to type tho......lol :D
Ok that is a different question than what you had posted before.
To check if a number has a decimal part.......man am I tired...
I think you will use the '%' symbol. I will get back with you on that.....right now it is bed time, and I can not think.
Ok, you can easily test if a floating point variable has desimal numbers.
This tests if the floating point value is same as its integer conversion.
if (Variable == (int)Variable) // test if there is no desimals
if ( !(Variable == (int)Variable) ) // test if there are desimals
Read the input as a string, then use (say strchr) to look for a decimal point.
Do what you need to do, depending on whether you find one or not.