求助,为何这个程序运行输不出,正确的,只是0.0的数字??
#include <stdio.h>int main (void)
{
long double CM ;
long FEET ;
long num ;
printf("Enter a height in centimeters:");
scanf("%d",&num);
CM = ( 328 / 10000);
FEET = 12 ;
while (num > 0)
{
printf( " %d.0 cm=%d feet , %.1f inches \n",num,(num * CM),(num * CM * FEET));
printf("Enter a height in centimeters (< = 0 to quit) :");
scanf("%d",&num);
}
return 0 ;
}