一个IT学生的问的

peng93 2012-12-08 02:46:31
怎么用以for循环打出9*9乘法表
??????
求解答
...全文
218 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
peng93 2012-12-09
  • 打赏
  • 举报
回复
算 还是大哥 牛b
makequestion 2012-12-08
  • 打赏
  • 举报
回复
package test; public class Test { public static void main(String[] args){ for(int i=1;i<10;i++){ int j=1; while(j<=i){ System.out.print(j+"*"+i+"="+i*j+" ");j++; } System.out.println(); } } } 这样算不算呢?
peng93 2012-12-08
  • 打赏
  • 举报
回复
大哥 我说的是用一个for循环啊? 用二个的我会啊 有一个学长说可以用一个for循环做出来
白彩6心 2012-12-08
  • 打赏
  • 举报
回复
public class Test{ public static void main(String args[]){ for(int i=1;i<10;i++){ for(int j=1;j<=i;j++){ System.out.print(+j+"*"+i+"="+i*j+" "); } System.out.println(); } } } 多想一下逻辑 对你后期会有帮助的
yanxing2012 2012-12-08
  • 打赏
  • 举报
回复
楼主可真赖! public class J{ public static void main(String args[]){ for(int i=1;i<10;i++){ for(int j=1;j<=i;j++){ System.out.print(+j+"*"+i+"="+i*j+" "); } System.out.println(); } } } 1*1=1 1*2=2 2*2=4 1*3=3 2*3=6 3*3=9 1*4=4 2*4=8 3*4=12 4*4=16 1*5=5 2*5=10 3*5=15 4*5=20 5*5=25 1*6=6 2*6=12 3*6=18 4*6=24 5*6=30 6*6=36 1*7=7 2*7=14 3*7=21 4*7=28 5*7=35 6*7=42 7*7=49 1*8=8 2*8=16 3*8=24 4*8=32 5*8=40 6*8=48 7*8=56 8*8=64 1*9=9 2*9=18 3*9=27 4*9=36 5*9=45 6*9=54 7*9=63 8*9=72 9*9=81

23,404

社区成员

发帖
与我相关
我的任务
社区描述
Java 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧