/*
* 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 马康泰
*/
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 integers, each enter a need to enter the confirmation:");//输入三个整数,每输入一个需回车确认
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 马康泰
*/
public class Number {
void sort(int a,int b,int c){
int count = 0;
int temp=0;
if(b<a){
temp=a;
a=b;
b=temp;
count++;;
System.out.println("Scheduling results for "+count+" operation:"+a+","+b+","+c);
}
if(c<a){
temp=a;
a=b;
b=temp;
count++;
System.out.println("Scheduling results for "+count+" operation:"+a+","+b+","+c);
}
if(c<b){
temp=b;
b=c;
c=temp;
count++;
System.out.println("Scheduling results for "+count+" operation:"+a+","+b+","+c);
}
if(count==0){
System.out.println("Scheduling results for "+count+" operation:"+a+","+b+","+c);
}
}
}