- import java.util.Scanner;
- class TextFangFaMax {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- int num1 = sc.nextInt();
- int num2 = sc.nextInt();
- int max = textMax(num1,num2);
- System.out.println("max = " + max);
- }
- public static int textMax(int num1,int num2){
- if (num1 > num2) {
- return num1;
- }else {
- return num2;
- }
- }
- }
复制代码 |
|