码迷,mamicode.com
首页 > 其他好文 > 详细

Algorithms 4th - 1.1 Basic Programming Model - CREATIVE PROBLEMS

时间:2014-10-22 20:16:11      阅读:215      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   ar   sp   div   log   ad   bs   

  欢迎交流

  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

标签:style   blog   color   ar   sp   div   log   ad   bs   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!