为啥不对?
public class HelloWorld{ public static void main(String[] args){ int num = 999; int count = 0; for (;count <= 9; count++) { double res = num / Math.pow(10,count); if ( res < 1) { System.out.println("它是个"+count+"位的数!"); break; } } } } 这个为啥不对?
public class HelloWorld{ public static void main(String[] args){ int num = 999; int count = 0; for (;count <= 9; count++) { double res = num / Math.pow(10,count); if ( res < 1) { System.out.println("它是个"+count+"位的数!"); break; } } } } 这个为啥不对?
2016-02-28
举报