Hi I've just started c programming and I have a task which requires me to check if a certain value i calculated is an integer. I've tried using
if (fmod(variable, 1)==0){
integer..
}else{
not integer..
but its not working for me..
is there any other function that i can use?
and I'm not sure what type of variable should I use(i.e int, double, float) to start with?
if (fmod(variable, 1)==0){
integer..
}else{
not integer..
but its not working for me..
is there any other function that i can use?
and I'm not sure what type of variable should I use(i.e int, double, float) to start with?
Comment