import java.util.Scanner; public class Pailie { public static void main(String []args) { Scanner sca=new Scanner(System.in); System.out.println("请输入第一个数字"); int i=sca.nextInt(); System.out.println("请输入第二个数字"); int i1=sca.nextInt(); System.out.println("请输入第三个数字"); int i2=sca.nextInt(); if(i>i1) { i=i+i1; i1=i-i1; i=i-i1; } if(i1>i2) { i1=i1+i2; i2=i1-i2; i1=i1-i2; } if(i>i1) { i=i+i1; i1=i-i1; i=i-i1; } System.out.println("你输入的数字是:"+i+","+i1+","+i2); } }
本文出自 “程序员的学习日” 博客,请务必保留此出处http://laiyicong.blog.51cto.com/10811813/1712227
原文:http://laiyicong.blog.51cto.com/10811813/1712227