/** * 使用循环输出杨辉三角 * * */ public class Test6 { public static void main(String[] args) { // 创建二维数组 int triangle[][] = new int[8][]; // 遍历二维数组的第一层 for (int i = 0; i < triangle.length; i++) { // 初始化第二层数组的大小 triangle[i] = new int[i + 1]; // 遍历第二层数组 for (in…
最近学习了下python,发现里面也有yield的用法,本来对C#里的yield不甚了解,但是通过学习python,对于C#的yield理解更深了!! 不多说了,小学生水平的表达能力伤不起.... 直接上代码: using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication2 {…