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

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. 少年开始学习c#编程,过路的大神请担待!

    这应该真正算开始学习编程, 安装好了 linux, 开通了博客员的博客, 同时今天也需要把sublime安好, 安装MonoDevelop Codeblocks mysql-workbench 配置好 ...

  2. java连接ssh执行shell脚本

    在liunx上写了一个shell脚本,想通过java去调用这个shell脚本,不知道怎么去调用,在网上说使用process这个进程方式,但是我执行机和我shell脚本都不在同一台电脑,老大说java中 ...

  3. 【CCPC-Wannafly Winter Camp Day3 (Div1) G】排列(水题)

    点此看题面 大致题意:已知 \(p\)为\(n\)的一个排列,定义\(A(p)_i=min_{j=1}^ip_j\),若用\(q_i\)表示\(p\)第\(i\)小的前缀的长度(以值为第一关键字,下标 ...

  4. 使用Sort方法对数组进行快速排序

    实现效果: 知识运用: Array类的Sort方法 public static void Sort(Array array)   // array:要排序的一维Array数组 实现代码: static ...

  5. 【转】css行高line-height的一些深入理解及应用

    一.前言 前两天在腾讯ISD团队博客上看到一篇翻译的文章“深入理解css 行高”,是个不错的文章,学到了不少东西,建议您看看. 这里,我也要讲讲我对line-height的一些理解,所讲解的东西绝大多 ...

  6. svn update 时总是提示 Password for '默认密钥' GNOME keyring: 输入密码

    执行svn update 时 总是提示输入密码. $ cd ~/.gnome2/keyrings/ $ ls $ rm 默认密钥.keyring

  7. java的四个元注解 @Retention @Target @Document @Inherited

    1.  @Retention  :注解的保留位置 @Retention(RetentionPolicy.SOURCE)  //注解仅存在于源码中,在class字节码文件中不包含 @Retention( ...

  8. jeDate日期控件

    http://www.jayui.com/jedate/     这是日期控件官网,可以去里面下载使用 前台 <%@ Page Language="C#" AutoEvent ...

  9. ajax实现无刷新两级联动DropDownList

    ajax实现的无刷新三级联动 http://zhangyu028.cnblogs.com/articles/310568.html 本文来自小山blog:http://singlepine.cnblo ...

  10. caffe中protobuf问题

    安装caffe时,protobuf在使用import caffe时,python版的会提示protobuf的问题,原因是因为protobuf的安装是用python-proto,而在安装anaconda ...