您的位置:首页 > 其它

程序1

2016-05-05 20:05 393 查看
//输出任意乘法表
package com.test1;

public class Demo1_3 {

public static void main(String[] args) {
// TODO Auto-generated method stub
set(9);
}

//函数功能
public static void set(int n)
{
for(int x=1;x<=n;x++)	//控制行
{
for(int y=1;y<=x;y++)		//控制列
{
System.out.print(x+"*"+y+"="+x*y+"\t");
}
System.out.println(" ");
}
}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: