- <p> </p><p>public class Bask{
- public static void main(String[] args)throws Exception{
- long combi(int n, int r){
- int i;
- long p = 1;
- for(i = 1; i <= r; i++)
- p = p * (n-i+1) / i;
- return p;
- }
- void paint() {
- int n, r, t;
- for(n = 0; n <= 12; n++) {
- for(r = 0; r <= n; r++) {
- int i;/* 排版设定开始 */
- if(r == 0) {
- for(i = 0; i <= (12-n); i++)
- System.out.print(" ");
- }else {
- System.out.print(" ");
- } /* 排版设定结束 */
- System.out.print("%3d", combi(n, r));
- }
- System.out.println();
- }
- }
- }
- }</p>
复制代码 这个代码问题很多,怎么修改?
|
|