packagecn.Testcx;importjava.util.Scanner;publicclasslesson2{publicstaticvoidmain(String[]args){@SuppressWarnings(resource)Scannerinput=newScanner(System.in);System.out.print(请输入一个摄氏温度:);doubleCelsius=input.nextDouble();doubleFahrenheit=(9.0/5)*Celsius+32;System.out.println(摄氏温度:+Celsius+度+转换成华氏温度为:+Fahrenheit+度);System.out.print(请输入圆柱的半径和高:);doubleradius=input.nextDouble();inthigth=input.nextInt();doubleareas=radius*radius*Math.PI;doublevolume=areas*higth;System.out.println(圆柱体的面积为:+areas);System.out.println(圆柱体的体积为:+volume);System.out.print(输入英尺数:);doublefeet=input.nextDouble();doublemeters=feet*0.305;System.out.println(feet+英尺转换成米:+meters);System.out.print(输入一个磅数:);doublepounds=input.nextDouble();doublekilograms=pounds*0.454;System.out.println(pounds+磅转换成千克为:+kilograms);System.out.println(输入分钟数:);longminutes=input.nextInt();longyears=minutes/(24*60*365);longdays=(minutes%(24*60*365))/(24*60);System.out.println(minutes+分钟+有+years+年和+days+天);longtotalCurrentTimeMillis=System.currentTimeMillis();longtotalSeconds=totalCurrentTimeMillis/1000;longcurrentSeconds=totalSeconds%60;longtotalMinutes=totalSeconds/60;longcurrentMinutes=(totalSeconds%(60*60))/60;longcurrenthours=(totalMinutes/60)%24;System.out.print(输入时区偏移量:);bytezoneOffset=input.nextByte();longcurrentHour=(currenthours+(zoneOffset*1))%24;System.out.println(当期时区的时间为:+currentHour+时+currentMinutes+分+currentSeconds+秒);System.out.print(请输入v0,v1,t:);doublev0=input.nextDouble();doublev1=input.nextDouble();doublet=input.nextDouble();floata=(float)((v1-v0)/t);System.out.println(平均加速度a=+a);System.out.println(输入水的重量、初始温度、最终温度:);doublewater=input.nextDouble();doubleinitialTemperature=input.nextDouble();doublefinalTemperature=input.nextDouble();doubleQ=water*(finalTemperature-initialTemperature)*4184;System.out.println(所需热量为:+Q);System.out.print(输入年数:);intnumbers=input.nextInt();longoneYearsSecond=365*24*60*60;Longpopulation=(long)((312032486+((oneYearsSecond/7.0)+(oneYearsSecond/45.0)-(oneYearsSecond/13.0))*numbers));System.out.println(第+numbers+年后人口总数为:+population);System.out.print(输入速度单位m/s和加速度a单位m/s2:);doublev=input.nextDouble();doublea1=input.nextDouble();doublelengthOfAirplane=(Math.pow(v,2))/(2*a1);System.out.println(最短长度为:+lengthOfAirplane);System.out.print(输入存入的钱:);doublemoney=input.nextInt();doublemonthRate=5.0/1200;for(inti=1;i7;i++){doubletotal=money*(Math.pow(1+monthRate,i));System.out.println(第+i+个月的钱为:+total);//告诉我书上的银行在哪里,我要去存钱,半年本金直接翻6倍、、、}System.out.print(用户请输入身高(英寸)、体重(磅):);doubleheight=input.nextDouble();doubleweight=input.nextDouble();doubleBMI=(weight*0.45359237)/(Math.pow((height*0.0254),2));System.out.println(BMI的值为+BMI);System.out.print(输入x1和y1:);System.out.print(输入x2和y2:);doublex1=input.nextDouble();doubley1=input.nextDouble();doublex2=input.nextDouble();doubley2=input.nextDouble();doublepoint1=Math.pow((x2-x1),2);doublepoint2=Math.pow((y2-y1),2);doubledistance=Math.pow((point1+point2),(1.0/2));//也可以Math.pow((point1+point2),0.5)System.out.println(两点间的距离为:+distance);System.out.print(输入六边形的边长:);doubleside=input.nextDouble();doublearea=(3*(Math.pow(3,0.5))*(Math.pow(side,2)))/2;System.out.println(六边形的面积为:+area);}}