/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author lenovo
*/
import java.util.Scanner;
public class Example3_1 {
public static void main(String args[]){
Scanner reader = new Scanner(System.in);
System.out.println("input three numbers and enter affirm");
int x= reader.nextInt();
int y=reader.nextInt();
int z=reader.nextInt();
Number number = new Number();
number.sort(x,y,z);
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author lenovo
*/
public class Number {
void sort(int a,int b,int c){
int temp=0;
if(b<a)
{
temp=a;
a=b;
b=temp;
}
if(c<a)
{
temp=a;
a=c;
c=temp;
}
if(c<b)
{
temp=b;
b=c;
c=temp;
}
System.out.print("the result is :"+a+","+b+","+c);
}
09-15
11-03