代码和结果如图所示:
System.out.println();输出后换行。System.out.print();输出不换行如果是每条结果占一行。就都换成System.out.println();
要用println代替print