check if float is integer c
float f = 4.5886;
if (f == (int)f)
printf("yesn");
else printf("non");
check if float is integer c
float f = 4.5886;
if (f == (int)f)
printf("yesn");
else printf("non");
c check if argument is integer
bool isNumber(char number[])
{
int i = 0;
//checking for negative numbers
if (number[0] == '-')
i = 1;
for (; number[i] != 0; i++)
{
//if (number[i] > '9' || number[i] < '0')
if (!isdigit(number[i]))
return false;
}
return true;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us