12.000 is an integer, but it is followed by several zeros.
# include & ltstdio.h & gt
void main()
{
Floating-point number;
int NB
Printf ("enter a number");
scanf("%f ",& ampnum);
NB =(int)num;
while( 1)
{
if((num-NB)! =0)
{
Printf ("\ nYou entered a decimal, please re-enter:");
scanf("%f ",& ampnum);
NB =(int)num;
}
other
{
Break;
}
}
printf("\nnum=%f ",num);
}