java中编写个程序,要求按5摄氏的增量打印出一个从摄氏温度到华氏温度的转换表?
class Demo2_8{
public static void main (String args[]) { int h,c;
System。out。println("摄氏温度 华氏温度"); for (c=0; c<=40; c+=5) { h=c*9/5+32;
System。 out。println(" "+c+" "+h);
2-17
} } }。
class Demo2_8{
public static void main (String args[]) { int h,c;
System。out。println("摄氏温度 华氏温度"); for (c=0; c<=40; c+=5) { h=c*9/5+32;
System。
out。println(" "+c+" "+h);
2-17
} } }。收起