写一个方法,用一个for循环打印九九乘法表
public class MultiplicationTable {
/**
* @description 写一个方法,用一个for循环打印九九乘法表
* @author wangkun
* @param args
*/
public static void main(String[] args) {
int i,j;
for (i = 1 ; i <= 9 ; i ++){
for(j = 1 ; j <= i ; j ++){
System.out.print(j + "*" + i + "=" + i * j + " ");
}
System.out.println();
}
}
}
写一个方法,用一个for循环打印九九乘法表的更多相关文章
- Java-for循环打印九九乘法表
Java打印九九乘法表 public class forDemo04 { public static void main(String[] args) { //练习3:打印九九乘法表 /* 1*1=1 ...
- for循环打印九九乘法表
学习目标: 熟练掌握 for 循环的使用 例题: 需求:打印九九乘法表 代码如下: // 九九乘法表 // row 为行,col为列 for(int row = 1; row < 10; row ...
- 用JS的for循环打印九九乘法表
需要使用两个for循环嵌套,代码如下: <!DOCTYPE html> <html lang="en"> <head> <meta cha ...
- python while 循环打印九九乘法表
方向一 i = 1 while i <= 9: j = 1 while j <= i print('%d*%d = %2d'%( j,i ,i*j),end='') j += 1 prin ...
- 用for循环打印九九乘法表(for嵌套循环)
package com.Summer_0416.cn; /** * @author Summer * */ public class Test_Method10 { public static voi ...
- lua学习之循环打印九九乘法表
--第4题 输出99乘法表 function PrintMulitiplyTable() , do local res = {} local str = "" , i do res ...
- JavaScript-双层for循环打印九九乘法表
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- python3:使用for循环打印九九乘法表
for i in range(1, 10): for j in range(1, i + 1): print(j, '*', i, '=', i * j, end=" ") #en ...
- 利用Python循环(包括while&for)各种打印九九乘法表
一.for循环打印九九乘法表 #注意:由于缩进在浏览器不好控制,请大家见谅,后续会有图片传入. 1.1 左下角 for i in range(1,10): for j in range(1,i+1): ...
随机推荐
- FIS-PLUS百度前端框架使用过程
1.如果后端开发语言是php,那么前端fis框架用FIS-PLUS,如果是java则用jello 2.FIS-PLUS使用步骤 1.安装nodejs 2.安装 fis npm install -g f ...
- LeetCode: Linked List Cycle II 解题报告
Linked List Cycle II Given a linked list, return the node where the cycle begins. If there is no cyc ...
- 在pycharm中启动Django服务器
1.要是直接运行manage.py程序的话 会提示一大堆东西,那无非是提示没有传入参数.先打开mange.py,然后再运行,会提示一堆东西,表示没有配置参数.在pycharm右上角点击edit con ...
- hdu3926(判断两个图是否相似,模版)
题意:给你2个图,最大度为2.问两个图是否相似. 思路:图中有环.有链,判断环的个数以及每个环组成的人数,还有链的个数以及每个链组成的人数 是否相等即可. 如果形成了环,那么每形成一个环,结点数就会多 ...
- Android实例-调用GOOGLE的TTS实现文字转语音(XE7+小米2)(XE10.1+小米5)
相关资料: 注意:在手机上必须选安装文字转语音引擎“google Text To Speech”地址:http://www.shouji56.com/soft/GoogleWenZiZhuanYuYi ...
- struts工作原理不错的解释___
Struts 使用 Model 2 架构.Struts 的ActionServlet 控制导航流.其他Struts 类,比如Action, 用来访问业务逻辑类.当 ActionServlet 从容器接 ...
- RedHat 6 yum 使用网易源
. . . . . 刚装好了 RedHat 6 系统,但是使用 yum 的时候总是提示 nothing to do,并且什么都做不了.后来经过一番搜索才知道,红帽的 yum 在线更新是收费的,而且必须 ...
- [转].Net连接池超时注意事项
http://blog.csdn.net/jxqvip/article/details/6738551 超时时间已到.超时时间已到,但是尚未从池中获取连接.出现这种情况可能是因为所有池连接均在使用,并 ...
- 【整理】fiddler不能监听 localhost和 127.0.0.1的问题
localhost/127.0.0.1的请求不会通过任何代理发送,fiddler也就无法截获. 解决方案 1,用 http://localhost. (locahost紧跟一个点号)2,用 http: ...
- centos5中添加163yum源
1.我们用linux系统的时候,经常需要使用yum.但是如果使用系统自带的yum源时,往往速度很慢,而且经常容易出错.其实国内有很多优秀的开源的yum源.比如(163,sohu,中科大).这里我以16 ...