这段代码在for循环中不断给我一个死代码警告,并且由于某种原因i++
它没有增加!i
import java.util.Scanner;
public class HideThatNumber {
/**
* @param args
*/
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int enc=input.nextInt();
int tur=0;
String test="";
double x;
for (int i=1;i<10;i++){
test="";
test+=i;
test+=enc;
x=Integer.parseInt(test);
x/=11;
if(x==Math.round(x));{
tur=i;
break;
}
}
if(tur==0)
System.out.println("Impossible");
else
System.out.println(Integer.parseInt(test)/11);
}
}