写一个方法,用一个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): ...
随机推荐
- RAID卡的缓存与磁盘自带的缓存的关系
RAID卡是否有(启用)缓存对“随机读写”性能有巨大的影响.中高端的RAID卡都有缓存(价格也高). 那么RAID卡的缓存与磁盘自带的缓存是如何设置的? 戴尔服务器的perc H710 RAID卡有5 ...
- 如何在Windows环境下模拟丢包
[本文出自天外归云的博客园] Q&A Question: How to simulate packet loss on Windows? Answer: Clumsy, an utility ...
- django 目录结构修改
├── manage.py └── myxunlei ├── settings.py ├── settings.pyc ├── urls.py ├── urls.pyc ├── wsgi.py └── ...
- app测试初窥
要用到的两个神器:abd&drozer adb介绍 adb的全称为Android Debug Bridge,就是起到调试桥的作用,作为一名开发者倒是常用到这个工具.借助adb工具,我们可以管理 ...
- Beaglebone Black教程Beaglebone Black中的Cloud9 IDE基本使用
Beaglebone Black教程Beaglebone Black中的Cloud9 IDE基本使用 Beaglebone Black中的Cloud9 IDE基本使用 Cloud9是集成在Beagl ...
- InstallShield安装jdk并设置环境变量
1. 检查是否安装jdk function OnBegin() begin Disable (BACKBUTTON); if(!MAINTENANCE)then SdLicense2 ("L ...
- C#使用System.IO.Path获取文件路径、文件名
class Program { static void Main(string[] args) { //获取当前运行程序的目录 string fileDir = Environment.Current ...
- am335x ar8031 双网口配置记录
kernel version 4.4.12 ar8031 phy 驱动是: kernel_4.4.12/drivers/net/phy/at803.c kernel make menuconfig d ...
- 数据库并发事务控制四:postgresql数据库的锁机制二:表锁 <转>
在博文<数据库并发事务控制四:postgresql数据库的锁机制 > http://blog.csdn.net/beiigang/article/details/43302947 中后面提 ...
- c#设计应用程序单实例运行
利用WindowsFormsApplicationBase的IsSingleInstance来控制应用程序只能单实例运行. [DllImport("user32.dll", Ent ...