acmore.cc|acmore.cc1021科学方面:计算能量1022科学方面:风寒温度1023打印表格1024字符转换1025几何方面:两点间的距离

1021:

import java.util.Scanner;




public class Main {


/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sca = new Scanner(System.in);
double a = sca.nextDouble();
double b = sca.nextDouble();
double c = sca.nextDouble();
double d = a*(c-b)*4184;
System.out.printf("The energy needed is "+"%.1f",d);


}


}

1022:

import java.util.Scanner;




public class Main {


/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sca = new Scanner(System.in);
double a = sca.nextDouble();
double b = sca.nextDouble();
double c = 0;
if (a>=(-48)&&a<=41&&b>=2) {
double temp = Math.pow(b,0.16);
double TEMP = Math.pow(a,0.16);
c = 35.74+0.6215*a-35.75*temp+0.4275*a*temp;
System.out.printf("The wind chill index is "+"%.5f",c);
}




}


}

1023:

import java.util.Scanner;


public class Main {
    public static void main(String[] args) {
        Scanner sca = new Scanner(System .in);
        int n = sca.nextInt();
        System.out.println("a"+"\t"+"b"+"\t"+"pow(a,b)");
        int i = 1;
        while (n>=i){
            System.out.println(i+"\t"+(i+1)+"\t"+(int)Math.pow(i,i+1));
            i+=1;
        }
    }
}

1024:

import java.util.Scanner;


public class Main {
    public static void main(String[]args) {
        Scanner sca = new Scanner(System.in);
        String s = sca.next();
        char ch = s.charAt(0);
        if (Character.isUpperCase(ch)){
            System.out.println(Character.toLowerCase(ch));
        }
        else if (Character.isLowerCase(ch)){
            System.out.print("Small ");
            System.out.print(ch);
        }
        else {
            System.out.print(ch);
        }




    }
}

1025:

import java.util.Scanner;




public class Main {


/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sca = new Scanner(System.in);
double a = sca.nextDouble();
double b = sca.nextDouble();
double c = sca.nextDouble();
double d = sca.nextDouble();
double e = Math.pow((a-c),2);
double f = Math.pow((b-d),2);
double g = Math.sqrt((e+f));


System.out.printf("The distance of the two points is "+"%.15f",g);



}

}

题目详情

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值