Home > Back-end >  Java assignment respectively, please the abcd four integer sorting how line?
Java assignment respectively, please the abcd four integer sorting how line?

Time:09-30

Package day03;
import java.util.Scanner;
//don't consider using array sorting and call sorting method under the condition of using if else how line?
Public class Test1 {
Public static void main (String [] args) {
Scanner scan=new Scanner (System. In);
System. The out. Println (" please enter the four integers: ");
int a,b,c,d;
A=scan. NextInt ();
B=scan. NextInt ();
C=scan. NextInt ();
D=scan. NextInt ();
System. The out. Println (" you enter four integer is: ");
System. The out. Println (a + "" +" "+ b + c +" "+ d);
//???
System. The out. Println (" sorted in reverse chronological order ");
System. The out. Println (a + "" +" "+ b + c +" "+ d);
}
}

CodePudding user response:

Many times that you have to if the else luo=4 + 3 + 2

CodePudding user response:

Max=max> C? Max: c;
Max=max> d? Max: d;
System. The out. Println (" maximum="+ Max);
Min=aMin=minMin=minSystem. The out. Println (" minimum value="+ min);

CodePudding user response:

For example

System. The out. Println (" you enter four integer is: ");
System. The out. Println (a + "" +" "+ b + c +" "+ d);
If (aIf (aIf (aIf (bIf (bIf (c at this timeSystem. The out. Println (" sorted in reverse chronological order ");
System. The out. Println (a + "" +" "+ b + c +" "+ d);
  • Related