public class temperature3{
public static void main(String[] args){
Scanner wind=new Scanner(System.in);
System.out.println("请输入华氏温度:f=");
double f=wind.nextInt();
double a=5/9f;
double c=a*(f-32);
System.out.println("摄氏温度:c="+c);
}
}
import java.util.Scanner;
public class temperature3{
public static void main(String[] args){Scanner wind=new Scanner(System.in);
System.out.println("请输入华氏温度:f=");
double f=wind.nextInt();
double a=5/9f;
double c=a*(f-32);
System.out.println("摄氏温度:c="+c);
}
}
import java.util.Scanner;
public class Pa2{
public static void main(String[] args){
Scanner rain=new Scanner(System.in);
System.out.println("请输入第一个数:a=");
int a=rain.nextInt();
System.out.println("请输入第二个数:b=");
int b=rain.nextInt();
System.out.println("请输入第三个数:c=");
int c=rain.nextInt();
int pro=a*b*c;
float ave=(a+b+c)/3;
System.out.println("三个数的和="+pro);
System.out.println("三个数的平均值="+ave);
}
}
import java.util.Scanner;
public class Score4{
public static void main(String[] args){
Scanner wind=new Scanner(System.in);
System.out.println("请输入学生的成绩:=");
int score=wind.nextInt();
System.out.println(score>=90?"该学生为A等级":score<60?"该学生为C等级":"该学生为B等级");
}
}
import java.util.Scanner;
public class Max{
public static void main(String[] args){
Scanner rain=new Scanner(System.in);
System.out.println("请输入第一个数:a=");
int a=rain.nextInt();
System.out.println("请输入第二个数:b=");
int b=rain.nextInt();
System.out.println("请输入第三个数:c=");
int c=rain.nextInt();
System.out.println(a>b&&a>c?"最大的数为a="+a:b>a&&b>c?"最大的数为b="+b:"最大的数为c="+c);
}
}