入力された高さ (cm) をフィートとインチに変更するこのプログラムを作成しました。実行すると、止まることなく結果が表示され続けます。誰かが理由を知っていますか?
#include <stdio.h>
int main (void)
{
float heightcm;
float feet;
float inch;
printf("Enter height in centimeters to convert \n");
scanf("%f", &heightcm);
while (heightcm > 0)
{
feet = heightcm*0.033;
inch = heightcm*0.394;
printf("\n %0.1f cm = %0.2f feet and %0.2f inches \n", heightcm,feet,inch);
}
return 0;
}