第九天

public class Example3_2 {

   public static void main(String argn[ }) {

      int a = 9,b = 5,c = 7,t = 0;

      if(b<a) {

         t = a;

         a = b;

         b = t;

      }

      if(c<a) {

         t = a;

         a = c;

         c = t;

      }

      if(c<b) {

         t = b;

         b = c;

         c =  t;

     }

     System.out.println("a="+a+",b="+b+",c="+c);

   }

}

       

猜你喜欢

转载自blog.csdn.net/sutiesenn/article/details/80173323