首页 > 应用开发 > > 为啥是“它是个1位的数!它是个2位的数!”
public static void main(String[] args) {
int num = 999;
int count = 0;
for(count=1; (num/=10)>0; count++){
System.out.print("它是个"+count+"位的数!");
}
}
}来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1192/viewspace-3145250/ ,如需转载,请注明出处,否则将追究法律责任。