首页 > 其他 > 详细

Algorithms 4th - 1.1 Basic Programming Model - CREATIVE PROBLEMS

时间:2014-10-22 20:13:00      阅读:295      评论:0      收藏:0      [点我收藏+]

  欢迎交流

  1.1.26

public class TestApp {
    public static void main(String[] args) {

        int a = StdIn.readInt();
        int b = StdIn.readInt();
        int c = StdIn.readInt();
        int t;

        if( a > b) {
            t = a;
            a = b;
            b = t;
        }

        if( a > c) {
            t = a;
            a = c;
            c = t;
        }

        if( b > c) {
            t = b;
            b = c;
            c = t;
        }

        StdOut.println(a + "->" + b + "->" + c);
    }
}

 

Algorithms 4th - 1.1 Basic Programming Model - CREATIVE PROBLEMS

原文:http://www.cnblogs.com/Azurewing/p/4044108.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!