do-while 编程

来源:百度知道 编辑:UC知道 时间:2024/06/17 23:01:54
用do-while实现 输出摄氏温度与华氏温度的对照表 要它从摄氏温度0-250 每隔20度为一项,对照表中的条目不超过10条
提示:转换关系:华氏温度=摄氏温度*9/5.0+32;条件,<=10 && 摄氏温度<=250

int count=0;
double ss=0;
double hs=0;

do{
hx=(ss*9)/5+32;
System.our.println(ss+">>>>>>>>"+hx);
count++;
ss=ss+20;
}while (count<=10 && ss<=250)

学java都是这样学的吗?这种问题都来问