• 第十二章:while循环语句


    代码:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace while循环语句
    {
        /// <summary>
        /// while循环语句:循环的意思就重复的意思
        /// 
        /// </summary>
        class Program
        {
            static void Main(string[] args)
            {
                //打印1-9到屏幕上
                int num = 1;
    
                while (num<=9)
                {
                    Console.WriteLine(num);
                    num = num + 1;//自增一
                    //num++;一元运行符
                    //num--;
                }
                Console.Read();
            }
        }
    }
  • 相关阅读:
    form标签
    roadmap
    自我介绍
    3 week work—Grid Layout
    3 week work—Position
    2nd week
    objects
    个人简介
    7th week :DOM BOM
    颜色表示法
  • 原文地址:https://www.cnblogs.com/wangqiangya/p/13051412.html
Copyright © 2020-2023  润新知