Public class Test {
Public static void main (String [] args) {
Int the peo;
System. The out. Println (" please input the number: ");
Scanner inp=new Scanner (System. In);
The peo=inp. NextInt ();
Int k=Keeper (20, 3);
System. Out.println (" finally left is "+ k +" no!" );
}
Public static int Keeper (int, int 3) {
int k=0;//leave people in the array subscript
Int [] array=new int [8].
For (int I=1; i <8; I++) {
Int j=1;//
While (j & lt;=n) {
If (1) {
J -;
}
If (j)==n {
2;
}
j++;
3;
}
}
For (k=0; K & lt; The peo; K++) {
If (array [k]==0) {
4.
}
}
The return of k + 1;
}
}
Code fills up the topic online, etc., urgent needs to solve
CodePudding user response:
This fills up the topic, thought it just fill in 1, 2, 3, 4, as a result, digital place is essentially the sky
Int k=Keeper (20, 3);//int k=Keeper (peo, 3);
Public static int Keeper (int, int 3) {//public static int Keeper (int the peo, int n) {
Int [] array=new int [8].//int [] array=new int (peo);
For (int I=1; i <8; I++) {//for (int I=1; i
2;//array [k]=1;
3;//k=(k + 1) % peo;
4.//break;