已采纳回答 / 969999666696
首先,因为我们是在判断num是几位数,所以应该把count++;改成num/=10;其次,程序要我们输出的内容的中文部分是用输入法的中文形式输入的,所以感叹号要用输入法的中文形式输入,你的感叹号是用输入法的英文形式输入的~
2018-07-21
最新回答 / 读C加尚JAVA
public class HelloWorld{ public static void main(String[] args) { final String NAME="imooc" ; final char SEX='男'; System.out.println(NAME+SEX); }}我也不知道哪错了
2018-07-21
最新回答 / LingDie
注意 :如果要把 break; 這行放在 if 之後 , System.out.print("当前的累加值为:" + sum); 這行 必須在 for{ } 之外,不然顯示不出來
2018-07-21
最赞回答 / 真真贵
public class test { public static void main(String[] args) { for(int i=1;i<=5;i++) { switch (i){ case 1: case 5: for(int j=1;j<=5;j++) { System.out.print("*"); } break; default: for(int k=1;k<=5;k++) { if(k==1||k...
2018-07-21
已采纳回答 / RRachel
不能,return只是返回一个参数,用来传递实参,并没有打印的功能,需要将返回的参数保存在一个变量中,然后打印输出变量。例如 int a=scores[i];System.out.println(a);
2018-07-20