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

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. Linux远程桌面(二)

    上一篇远程桌面采用的独立服务配置不适用于过多用户,这一篇采用超级Internet服务器搭建vnc服务可以解决多用户问题.  vnc之xinetd服务搭建配置 Linux远程桌面(一):vnc之独立服务 ...

  2. Sublime插件支持Sass编译和Babel解析ES6 & .sublime-build文件初探(转载自imwtr)

    原文请看:http://www.cnblogs.com/imwtr/p/6010550.html   用Sublime Text蛮久了,配置配来配去的,每次换电脑都得重头再配过,奈何人老了脑子不中用了 ...

  3. 使用Excel调用ABAP系统的函数

    效果:在excel里创建一个按钮,开发一些VB script,可以连接指定的ABAP系统并执行系统里的ABAP function module. 在这里例子里执行ABAP系统的函数TH_USER_LI ...

  4. Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.错误

    错误如图示: 1.在php的目录下建立个文件夹tmp,这个有权限的问题,如果是ntfs的分区,就一定要添加evryone的控制权限,否则是没用的.2.在php.ini找到session.save_pa ...

  5. mysql轮廓总结

    架构=数据类型.索引.分片.主从复制原理.数据备份 学习软件,都应该先从架构入手,每一层掌握就行.mysql难吗?从其架构层开始,就不难啦. 架构结构:http://www.cnblogs.com/h ...

  6. 在Nutz中如何配置多个数据库源,并且带事务控制

    在Nutz中如何配置多个数据库源,并且带事务控制  发布于 560天前  作者 Longitude 995 次浏览  复制  上一个帖子  下一个帖子  标签: 无 在Nutz中如何配置多个数据库源, ...

  7. jade文档声明和头尾标签

    作为一个页面,首先需要一个doctype的声明,它位于文档最上面的位置,放置html标签以前,用来告知浏览器当前这个页面用哪种html,或者xml的规范并解析页面   doctype html htm ...

  8. RPC&ORM

  9. Javascript与C#中使用正则表达式

    JavaScript RegExp 对象 新建一个RegExp对象 new RegExp(pattern,[attributes])           注: \d需要使用[0-9]来代替 参数 参数 ...

  10. JDBC-Hibernate-Mybatis

    JDBC sql语句和Java代码混在了一起 Hibernate 自动生成sql语句 Mybatis 将sql语句写在xml文件中,使用时动态生成