zoukankan      html  css  js  c++  java
  • for嵌套for ★

    namespace for嵌套for五角星
    {
        class Program
        {
            static void Main(string[] args)
            {
                while (true)
                {
                    string a = "★";                    //注意换行与不换行的应用,如果要去掉对角线的话往上的话只要j<=i即可。
                   
                    for (int i = 1; i <=5; i++)
                    {
                        for (int j = 1; j <= i; j++)
                        {
                            Console.Write(a);
                        }
                        Console.WriteLine();
                    }
                   
                     Console.ReadLine();
                }
            }
        }
    }

  • 相关阅读:
    Alpha冲刺第一天
    团队项目-需求分析
    设计模式第二次作业
    设计模式第一次作业
    冲刺合集
    冲刺NO.12
    项目测试
    冲刺NO.11
    冲刺NO.9
    冲刺NO.10
  • 原文地址:https://www.cnblogs.com/lk-kk/p/4382100.html
Copyright © 2011-2022 走看看