编程语言
首页 > 编程语言> > Java输出乘法口诀表

Java输出乘法口诀表

作者:互联网

Java输出乘法口诀表
public class Multiplication {

public static void main(String[] args) {
	// TODO Auto-generated method stub
int i,j;
for(i=1;i<=9;i++) {
	for(j=1;j<=i;j++)
		System.out.print(i+"*"+j+"="+(i*j)+"\t");
    System.out.println();
}
}

}

print和println的区别:

public class Difference {

public static void main(String[] args) {
	// TODO Auto-generated method stub
System.out.print("hhhh");
System.out.print("哈哈哈");
System.out.println("xixiixi");
System.out.println("嘻嘻嘻嘻");
}

}

hhhh哈哈哈xixiixi
嘻嘻嘻嘻

标签:Java,嘻嘻,口诀,System,println,print,乘法,public,out
来源: https://blog.csdn.net/kfjrlgagkogkhpa/article/details/100782876