#include /* fahr = 0,20…, 300に対して摂氏,華氏対応表を印字する */ /* 2005-6-14 Yoshinari Nomura */ main() { int fahr, celsius; int lower, upper, step; /* int fahr, celsius,lower, upper, step; */ /* int fahr; int celsius; int lower; int upper; int step; */ lower = 0; /* 温度の下限 */ upper = 300; /* 上限 */ step = 20; /* きざみ */ fahr = lower; while (fahr <= upper) { celsius = 5 * (fahr - 32) / 9; printf("%d\t%d\n", fahr, celsius); fahr = fahr + step; } }