首页 > 代码库 > Algorithms 4th - 1.1 Basic Programming Model - CREATIVE PROBLEMS

Algorithms 4th - 1.1 Basic Programming Model - CREATIVE PROBLEMS

  欢迎交流

  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