温度对照表1
来源:互联网 发布:mac装完win10没有wifi 编辑:程序博客网 时间:2024/05/01 09:29
import java.util.Scanner;public class Temperature{public static void main(String args[]){int f;int c; for(int i=0;i<16;i++){f=20*i;System.out.printf(f+"\t");c=(int)(5.0/9*(f-32));System.out.println(c);}}}
public class Temperature1{public static void main(String args[]){int f;float c;for(int i=15;i>=0;i--){f=i*20;System.out.print(f+"\t");c=(float)(5/9.0*(f-32));System.out.printf("%.1f",c);System.out.println();}}}
通过for循环显示温度对照表,每一行都通过公式f=20*i计算华氏温度,华氏温度与摄氏温度输出显示通过制表符间隔,通过c=(int)(5.0/9*(f-32))计算摄氏温度。
阅读全文
0 0
- 温度对照表1
- 生成 温度-AD 对照表
- 算法:输出华氏和摄氏的温度对照表
- 发一个NTC 阻值温度对照公式
- 温度检测-GPU温度(1)
- 温度转换表:
- 习题1-2,温度
- 1-2 温度
- 习题 1-2 温度
- 1温度转换
- Tset.1 温度
- 温度
- 温度
- 温度
- 温度
- 对照表
- 颜色对照表方便对照
- 习题1-2 温度(temperature)
- 236. Lowest Common Ancestor of a Binary Tree
- 回退流
- Majority Element
- 基于GPUImage的实时美颜滤镜
- c#读写App.config,ConfigurationManager.AppSettings
- 温度对照表1
- 关于客户科技全志R16平台配SPI接口的NOR格式的FLASH的刷tinav2.1系统的解决过程(草稿)
- 《Python机器学习及实践》----无监督学习之特征降维
- Jin Ge Jin Qu hao UVA
- CSS3background-size背景图片尺寸属性
- K3开放防火墙端口(V12.3)
- Struts2的执行流程
- Cookies 模拟登录
- 中国国际大数据大会2017将有重磅大咖助阵!