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

后端 未结 28 1539
天命终不由人
天命终不由人 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:12

    using static IronRuby.Ruby;
    
    class Print1To100WithoutLoopsDemo
    {
        static void Main() => 
          CreateEngine().Execute("(1..100).each {|i| System::Console.write_line i }");
    }
    

    Hey, why not?

提交回复
热议问题