Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1449178
  • 博文数量: 3500
  • 博客积分: 6000
  • 博客等级: 准将
  • 技术积分: 43870
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-03 20:31
文章分类

全部博文(3500)

文章存档

2008年(3500)

我的朋友

分类:

2008-05-04 19:05:10

一起学习
//写一个终端输入类以便键盘输入需要数值 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 下载本文示例代码


数组实现杨辉三角数组实现杨辉三角数组实现杨辉三角数组实现杨辉三角数组实现杨辉三角数组实现杨辉三角数组实现杨辉三角数组实现杨辉三角数组实现杨辉三角数组实现杨辉三角数组实现杨辉三角数组实现杨辉三角
阅读(126) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~