利用Java找出输入abc中最大值

import java.util.Scanner;

public class abcmax {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int max=0;
System.out.print(“输入a:”);
int a = scanner.nextInt();
System.out.print(“输入b:”);
int b = scanner.nextInt();
System.out.print(“输入c:”);
int c = scanner.nextInt();
if (a>b){
max=a;
}
else{
max=b;
}
if (c>max){
max=c;
}
System.out.print(“最大值为:” +max);
}
}

利用Java找出输入abc三个数中最大值

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-01
猜你喜欢
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-11
  • 2022-01-12
  • 2022-03-02
相关资源
相似解决方案