Home > Java > javaTutorial > body text

How to output the multiplication table using java

高洛峰
Release: 2017-02-08 13:07:50
Original
2573 people have browsed it

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();
}
}
}
Copy after login

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!