一个for循环写出9*9乘法表
2024-10-19 17:40:51
public class ClassTest03 {
public static void main(String[] args) { for(int i=1,j=1;j<=9;j++){
if(i<j){
i++;
j=1;
System.out.println("");
}
else{
System.out.print(j+"*"+i+"="+i*j+" ");
//排版 低于两位数时多占一个空格
if(i*j<10)
System.out.print(" ");
}
}
}
}
最新文章
- 基于netty http协议栈的轻量级流程控制组件的实现
- Thinkpad 装 centos 7后发热量大处理
- 用OPencv配置vs2010
- Android网络通信库Volley简介
- android学习之activity
- JAVA 面向对象-2-继承(Inheritance)
- Android Material Design调色板
- Java 比较两日期相差天数
- ruby2.0(rails)以后版本的debug
- SVG的path的使用
- operator重载运算符
- Docker 控制组
- pyton 模块之 pysmb 文件上传和下载(linux)
- 函数和常用模块【day06】:hashlib模块(十三)
- uglifyjs-webpack-plugin 插件,drop_console 默认为 false(不清除 console 语句),drop_debugger 默认为 true(清除 debugger 语句)
- Calculate CAN bit timing parameters -- STM32
- 从云端到边缘 AI推动FPGA应用拓展
- Vim实用技巧系列 - 搜索
- mysql备份的 三种方式【转】
- 《转》深入理解Activity启动流程(三)–Activity启动的详细流程2