Home  >  Article  >  Java  >  How to output the multiplication table using java

How to output the multiplication table using java

高洛峰
高洛峰Original
2017-02-08 13:07:502408browse

How to output the multiplication table using java

Code attached.

class Test3{
public static void main(String[]args){
//输出九九乘法表
for(int m=1;m<=9;m++){
for(int n=1;n<=m;n++){
System.out.print(n+"*"+m+" ");
}
System.out.println();
}
}
}

For more related articles on how to use java to output the multiplication table, please pay attention to the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:jQuery AjaxNext article:jQuery Ajax