How to print 1 to 100 without any looping using C#

后端 未结 28 1431
天命终不由人
天命终不由人 2020-12-22 19:30

I am trying to print numbers from 1 to 100 without using loops, using C#. Any clues?

28条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-22 20:13

    I can think two ways:

    • using 100 Console.WriteLine
    • using goto in a switch statement

提交回复
热议问题