为了测试你的学习效果,我们结合之前的知识点来做一个摄氏度转华氏度的小程序。从Celsius摄氏度转换为Fahrenheit华氏度的算法是:摄氏度的温度乘于9除于5,再加上32。创建一个变量 fahrenheit,然后计算出摄氏度对应的华氏度。
怎么写function convert(celsius) {
// Only change code below this line
// Only change code above this line
return fahrenheit;
}// Change the inputs below to test your code
convert(30);
怎么写function convert(celsius) {
// Only change code below this line
// Only change code above this line
return fahrenheit;
}// Change the inputs below to test your code
convert(30);
解决方案 »
- 解析一个xml文件的时候怎样自动打印其中的几行内容
- ftp文件下载问题,雪地里跪求,在线等
- SOA cxf 部署问题
- JSP向sql server存储图片问题(Tomcat报错)
- axis每次读取xml文件问题!
- myeclipse new->project中怎么没有client project????
- weblogic中用sqlserver配连接池的问题
- Tomcat为什么在运行的时候无法按照classpath指定的路径去找一个不在classes目录下的类呢??
- WebService返回内容过长出错怎么处理(TOMCAT5.0+Axis1.1)
- 换英文win xp后,Eclipse写JSP页面无法正常显示中文!!!求助!!!
- 工作五年,面试被秒,这些问题大家觉得难吗?
- 大哥帮帮忙啊,新手入公司
double centigrade = (fahrenheit * 9 / 5) + 32;
System.out.println(centigrade);
return centigrade;
}
public static void main(String[] args) {
double fahrenheit = 15;
Test5.FToC(fahrenheit);
}