码迷,mamicode.com
首页 > 其他好文 > 详细

作业1

时间:2017-09-11 12:25:43      阅读:237      评论:0      收藏:0      [点我收藏+]

标签:new   out   tin   val   com   ber   int()   font   avg   

1.2 

public class welcome
{
public static void main(String[] args){
System.out.println("Welcome to java!");
System.out.println("Welcome to java!");
System.out.println("Welcome to java!");
System.out.println("Welcome to java!");
System.out.println("Welcome to java!");}

}

 

1.8 

public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        System.out.print("半径为5.5");
        int r = sc.nextInt();
        sc.close();
        double s = Math.PI * 5.5 * r;
        double c = Math.PI * 5.5 * 2;
        System.out.println("圆的面积:" + s + ",圆的周长:" + c);
    }
}

1.12

	public double getAvg(double time,double len){

double hour = time/60;
double _len = len/1.6;
double avg = _len/hour;
return avg;
}

作业1

标签:new   out   tin   val   com   ber   int()   font   avg   

原文地址:http://www.cnblogs.com/kally004/p/7504116.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!