Home > Back-end >  Error cannot find symbols, should be how to change, please
Error cannot find symbols, should be how to change, please

Time:10-12

import java.util.Scanner;
Public class paixu {
Public static void main (String agrs []) {
Int a []=new int [8].
Scanner in=new Scanner (System. In);
for(int i=0; i<8; I++)
{
A [I]=in. NextInt ();
}
Int=Max min=0;
for(int j=1; j<8; J++)
{
If (a [Max] Max=j;
If (a/min & gt; A [j])
Min=j;
}
Int t=a, [0].
A [0]=a (Max);
A [Max]=t;
Int w=a, [7].
A [7]=a/min;
A (min)=w;
For (int z=0; Z<8; Z++)
System. The out. Println (a [z]);
}
}

CodePudding user response:

 int=Max min=0; 
this line min haven't define

There's minimum value in the last bug
 int w=a, [7]. 
A [7]=a/min;
A (min)=w;
  • Related