km
Junior Member level 3
Routine of the program:-
float ftov()
{
int a;
printf("\n \nEnter number:");
scanf("%d",&a);
OUT=0.000040955*a;
printf("\n OUT=%f\n",OUT);
return OUT;
}
When a = 10000, OUT = 0.40955
But why when a = 100000, OUT gives negative value (-1.272554) instead of 4.0995:?:
float ftov()
{
int a;
printf("\n \nEnter number:");
scanf("%d",&a);
OUT=0.000040955*a;
printf("\n OUT=%f\n",OUT);
return OUT;
}
When a = 10000, OUT = 0.40955
But why when a = 100000, OUT gives negative value (-1.272554) instead of 4.0995:?: