請(qǐng)問我哪錯(cuò)了?
public class Gyh{
? ?Gyh g=new Gyh();
? ? g.count();
? ??
? ? void count(){
? ? ? ? for( int i=0;num>1;i++ ){
? ? ? ? ? ?
? ? ? ? ? ? int num=999;
? ? ? ? ? ? num/=10;
? ? ? ? ? ? if(num<1){
? ? ? ? ? ? ? ? break;
? ? ? ? ? ? }
? ? ? ? ? ??
? ? ? ? }
? ? ? ? System.out.println("i"+i);
? ? }
? ?
? ? ?
}
2018-10-22
public class Gyh {
int num;
? ? void count(){
? ? ? ? for( int i=0; num>1;i++ ) {
? ? ? ? ? ? ?num=999;
? ? ? ? ? ? ?num/=10;
? ? ? ? ? ? ?if(num<1){
? ? ? ? ? ? ? ? break;
? ? ? ? ? ? }
? ? ? ? ? ? System.out.println("i"+i);
? ? ? ? }
? ? }
public static void main(String[] args) {
? ?Gyh g=new Gyh();
? ? ? ?g.count();
? ? }
}
改稱這樣再試試
2018-09-17