//写一个终端输入类以便键盘输入需要数值
import java.io.*;
public class ConsoleReader
{
private String temp;
BufferedReader reader;
public ConsoleReader()
{
reader = new BufferedReader(new InputStreamReader(System.in));
}
public int getInt()
{
try
{
temp = reader.readLine();
}
catch (IOException ex)
{
ex.printStackTrace();
}
return Integer.parseInt(temp);
}
}
//数组实现杨辉三角
import com.mfg.console.ConsoleReader;
public class YanHui
{
int[][] a;
public YanHui()
{
ConsoleReader console=new ConsoleReader();
System.out.print("请输入要求的杨辉三角的级数:");
int n=console.getInt();
a=new int[n][];
for(int i=0;i
//写一个终端输入类以便键盘输入需要数值
import java.io.*;
public class ConsoleReader
{
private String temp;
BufferedReader reader;
public ConsoleReader()
{
reader = new BufferedReader(new InputStreamReader(System.in));
}
public int getInt()
{
try
{
temp = reader.readLine();
}
catch (IOException ex)
{
ex.printStackTrace();
}
return Integer.parseInt(temp);
}
}
//数组实现杨辉三角
import com.mfg.console.ConsoleReader;
public class YanHui
{
int[][] a;
public YanHui()
{
ConsoleReader console=new ConsoleReader();
System.out.print("请输入要求的杨辉三角的级数:");
int n=console.getInt();
a=new int[n][];
for(int i=0;i
数组实现杨辉三角
来源:JAVA世界
作者:www.javaif.com
时间:2008-06-01
Tag:
点击:
0
最新评论共有 0 位网友发表了评论
查看所有评论
发表评论
- 热门焦点
-
热点关注
相关文章
精彩推荐

