public static void main(String[] args) {
//例1:使用while实现:输出摄氏温度与华氏温度的对照表,要求它从摄氏温度0度到250度,每隔20度为一项,对照表中的条目不超过10条。
//转换关系:华氏温度 = 摄氏温度 * 9 / 5.0 + 32
System.out.println("摄氏温度 \t 华氏温度");
double ss=0;
int i=1;
while (i<=10 && ss<=250 ){
double hs=ss*9/5.0+32;
System.out.println(ss+"-------"+hs);
ss=ss+20;
}
}