zoukankan      html  css  js  c++  java
  • 用c#语言编写1000以内能整除3的数字

    using System;

    using System.Collections.Generic;

    using System.Linq;

    using System.Text;

    namespace ConsoleApplicationl

    {

             class Program

              {   

                      static void Main(string[] args)

                       {

                               int number = 1; //当前的数字

                               while (number <= 1000)

                               {

                                          //判断当前的数字能否被3整除

                                          if (number % 3 == 0)

                                          {

                                                  Console.WriteLine(number);

                                           }

                                            number+;//再看下一个数

                                      }

                              }

                  }

  • 相关阅读:
    hibernate 映射<二>一对一主键关联
    C# Convert Type to T
    008 OS模块
    001基础知识补充与拓展
    005Buffer(缓冲区)
    009path模块
    002nodejs简介与安装
    007http模块
    004NPM包管理器
    003nodejs的模块化
  • 原文地址:https://www.cnblogs.com/yangkaiming/p/8733140.html
Copyright © 2011-2022 走看看