HW5.9


public class Solution
{
public static void main(String[] args)
{
System.out.printf("%s\t%s\t%s\t%s\n", "Inch", "Meter", "Meter", "Inch");
for(double i = 1, j = 20; i <= 10 && j <= 65; i++, j += 5)
System.out.printf("%f\t%f\t%f\t%f\n", i, footToMeter(i), j, meterToFoot(j));
}
public static double footToMeter(double foot)
{ return foot / 0.305; }
public static double meterToFoot(double meter)
{ return meter * 0.305; }
}
HW5.9的更多相关文章
- HW5.36
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- HW5.35
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- HW5.34
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- HW5.33
import java.util.Calendar; public class Solution { public static void main(String[] args) { long tot ...
- HW5.32
public class Solution { public static void main(String[] args) { int n1 = (int)(Math.random() * 5 + ...
- HW5.31
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- HW5.30
public class Solution { public static void main(String[] args) { for(int i = 3; i <= 1000; i++) i ...
- HW5.29
public class Solution { public static void main(String[] args) { int n1 = (int)(Math.random() * 5 + ...
- HW5.28
public class Solution { public static void main(String[] args) { System.out.printf("%s\t%s\n&qu ...
- HW5.27
public class Solution { public static void main(String[] args) { int totalCount = 0; int lineCount = ...
随机推荐
- RAC 安装完成后 节点间通信不依赖于SSH
RAC 安装完成后,想修改ssh 的端口.google了一下.原文https://community.oracle.com/thread/2444594?tstart=0 原文说的是11g,10g也好 ...
- Java学习-集合(转)
在编写java程序中,我们最常用的除了八种基本数据类型,String对象外还有一个集合类,在我们的的程序中到处充斥着集合类的身影!java中集合大家族的成员实在是太丰富了,有常用的ArrayList. ...
- 【JSF框架】 是一种标准
典型的JSF应用程序包含下列部分: 一组JSP页面 一组后台bean(为在一个页面上的UI组件定义的属性和函数的JavaBean组件) 应用程序配置资源文件(定义页面导航规则.配置bean和其它的自定 ...
- C和BlockCode
在使用code block的时候,需要先build,然后再run,否则run的还是上次编译的内容.
- 谷歌笔试题——排序,只允许0和其他元素交换
2.2 长度为n的数组乱序存放着0至n-1. 现在只能进行0与其他数的swap,请设计并实现排序. 这题有一个隐含条件:即数组元素是连续的,即0--n-1,当你排好序后,你会发现数组元素和该元素的下标 ...
- 1013: [JSOI2008]球形空间产生器sphere
很直观的一个gauss题: 用的是以前用过的一个模板: #include<cstdio> #include<algorithm> #include<cmath> # ...
- Android App性能优化笔记之一:性能优化是什么及为什么?
By Long Luo 周星驰的电影<功夫>里面借火云邪神之口说出了一句至理名言:“天下武功,唯快不破”. 在移动互联网时代,同样如此,留给一个公司的窗口往往只有很短的时间,如何把握住 ...
- php 使用jquery实现ajax
<html> <head> <meta http-equiv="Content-Type" content="text/html; char ...
- IB_DESIGNABLE的使用
创建LHQTextField 继承自: UITextField 将我自定义的textField在面板中进行关联 此时,在设置刚来添加的属性的值的时候,就会立马出效果
- Android 完全退出程序,以及再按一次返回键退出程序
再按一次返回键退出最终完整方案: boolean isExit; @Override protected void onCreate(Bundle savedInstanceState) { ...