为什么打印出来*不在一行,是打印一个空一行,打印两个空一行······?
public class eat {
public static void main (String[] args){
for(int i=1;i<=6;i++){
for(int j = 1;j<=i;j++){
System.out.println("*");
}
System.out.println("\n");
}
}
}
public class eat {
public static void main (String[] args){
for(int i=1;i<=6;i++){
for(int j = 1;j<=i;j++){
System.out.println("*");
}
System.out.println("\n");
}
}
}
2017-03-29
举报