public class JavaApplication {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
int i, j;
for(i = 1; i <= 9; i++)
for(j = 1; j <= i; j++)
{
if(j == i)
System.out.print(i+" * "+j+" = "+i*j+"\n");
else
System.out.print(i+" * "+j+" = "+i*j+",");
}
}
}
Java输出九九乘法表
最新推荐文章于 2023-07-27 08:20:23 发布