public class HelloWorld{
public static void main(String[] args){
int num = 999;
int count = 0;
do{
num = num / 10;
count ++;
}while(num != 0);
System.out.println("count:" + count);
}
while(num != 0)那这个不会一直循环下去么?只有0除以任何数才等于0呀
很棒哦