快捷导航

长方形问题

public class imooc{        public static void main(String[] args){                for(int i=1;i

免责声明:本内容仅代表回答者见解不代表本站观点,请谨慎对待。

版权声明:作者保留权利,不代表本站立场。

回复

使用道具 举报

参与会员2

println是指内容输出后 输出\n换行
可以看一下print printf println的区别
回复

使用道具 举报

System.out.println("*"); ==> 这一句改成System.out.print("*");
因为,需要输出长方形的话,在内循环的时候,*号是不能换行。
回复

使用道具 举报

可能感兴趣的问答

发新帖
  • 微信访问
  • 手机APP