20软工一班曾佳豪


私信TA

用户名:uq_32154905304

访问量:241

签 名:

等  级
排  名 16533
经  验 764
参赛次数 0
文章发表 1
年  龄 22
在职情况 学生
学  校 宜春学院
专  业

  自我简介:

解题思路:直接进行比较

注意事项:注意交换大小后的值

参考代码:

import java.util.Scanner;


public class T2247 {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

int a = sc.nextInt();

int b = sc.nextInt();

int c = sc.nextInt();

int t = 0;

if (a < b) {

t = a;

a = b;

b = t;

}

if (a >= c) {

System.out.println(a);

}else {

System.out.println(c);

}

}

}


 

0.0分

0 人评分

  评论区