用于打印杨辉三角的程序,有多种算法仅提供一种

PRogram yh (input,ouput);
var
  m,n,c:integer;
Begin
 For m:=0 TO 10 Do
   Begin
     c:=1;
     write(c:40-3*m);
     For n:=1 To m Do
       begin
         c:=c+(m-n+1) Div n;
         write(c:6)
       End;
     writeln
     End;
readln
End.

Pascal 杨辉三角的更多相关文章

  1. [LeetCode] Pascal's Triangle II 杨辉三角之二

    Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Return [1,3, ...

  2. [LeetCode] Pascal's Triangle 杨辉三角

    Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Retur ...

  3. LeetCode 118. Pascal's Triangle (杨辉三角)

    Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Retur ...

  4. [Swift]LeetCode118. 杨辉三角 | Pascal's Triangle

    Given a non-negative integer numRows, generate the first numRows of Pascal's triangle. In Pascal's t ...

  5. [Swift]LeetCode119. 杨辉三角 II | Pascal's Triangle II

    Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle. Note t ...

  6. [leetcode-118]Pascal's triangle 杨辉三角

    Pascal's triangle (1过) Given numRows, generate the first numRows of Pascal's triangle. For example, ...

  7. Leetcode#118. Pascal's Triangle(杨辉三角)

    题目描述 给定一个非负整数 numRows,生成杨辉三角的前 numRows 行. 在杨辉三角中,每个数是它左上方和右上方的数的和. 示例: 输入: 5 输出: [ [1], [1,1], [1,2, ...

  8. Pascal's Triangle leetcode java(杨辉三角)

    题目: Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, ...

  9. [LeetCode] 119. Pascal's Triangle II 杨辉三角之二

    Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle. Note t ...

随机推荐

  1. May 03rd 2017 Week 18th Wednesday

    Truth needs no colour; beauty, no pencil. 真理不需要色彩,美丽不需要涂饰. There is no absoulte truth and everlastin ...

  2. Excel公式巧用-将新值替换旧值,新值为空保留原值

    使用excel时候遇到 将新值替换旧值,新值为空保留原值的问题,简单使用Excel的函数即可以实现.

  3. 是否应该提供一个dao.insertIgnoreNull ? (像updateIgnoreNull一样)

     是否应该提供一个dao.insertIgnoreNull ? (像updateIgnoreNull一样)  发布于 406天前  作者 SayingCode  153 次浏览  复制  上一个帖子  ...

  4. 转载:手把手教你搭建 vue 环境

    以下内容转自: https://segmentfault.com/a/1190000008922234 第一步 node环境安装 1.1 如果本机没有安装node运行环境,请下载node 安装包进行安 ...

  5. bzoj4836 [Lydsy2017年4月月赛]二元运算

    Description 定义二元运算 opt 满足 现在给定一个长为 n 的数列 a 和一个长为 m 的数列 b ,接下来有 q 次询问.每次询问给定一个数字 c  你需要求出有多少对 (i, j) ...

  6. 【HHHOJ】ZJOI2019模拟赛(十五)03.17 解题报告

    点此进入比赛 得分: \(42+10+14=66\) 排名: \(Rank\ 3\) \(Rating\):\(+53\) \(T1\):[HHHOJ200]稗田的梦中之梦(点此看题面) 暴力\(DF ...

  7. 模拟插队,出队,POJ(2259)

    题目链接:http://poj.org/problem?id=2259 水题一个,就是要记录一下每个队列是否有人bool[i], #include <iostream> #include ...

  8. 20145238-荆玉茗 《Java程序设计》第3周学习总结

    20145238 <Java程序设计>第3周学习总结 教材学习内容总结 一.定义类: ·类定义时使用class关键字 ·如果要将x绑定到新建的对象上,可以使用"="制定 ...

  9. python doctest测试

    title: Python doctest测试 tags: Python --- doctest测试 python 提供了REPL(read-eval-print loop,读取.求值.输出的循环) ...

  10. Linux开发常见问题:GCC:链接器输入文件未使用,因为链接尚未完成

    问:我在Linux中运行一个make文件去编译C语言代码,然后得到了如下的错误信息: gcc  -Wall  -fPIC  -DSOLARIS  -DXP_UNIX  -DMCC_HTTPD  -D_ ...