hc学习平台

 找回密码
 立即注册
搜索
热搜: 活动 交友 javakc
 › tworld › 日志

输入三个数,找出最大一个数,并打印出来  

2022-08-05 16:51:21 查看(45) 回复(0)

 

  public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int x= scan.nextInt();
        int y= scan.nextInt();
        int z= scan.nextInt();
        if (x>y&&x>z){
            System.out.println(x);
        }else if(z>y&&z>x) {
            System.out.println(z);
        }else if(y>x&&y>z) {
            System.out.println(y);
        }
    }

评论 (0 个评论)

facelist

全部作者的其他最新日志



站点统计|举报|Archiver|手机版|小黑屋|Comsenz Inc.

GMT+8, , Processed in 0.195171 second(s), 9 queries .

Powered by javakc! X1.0

© 2004-2014 javakc

f1208.com 备案号:京ICP备14030918号-1

返回顶部