Loop from 1 to 10 with for loop - CSharp Language Basics

CSharp examples for Language Basics:for

Description

Loop from 1 to 10 with for loop

Demo Code

using System;//from  w w w  .j a v a2  s  .  co m
using static System.Console;
class Program
{
   static void Main(string[] args)
   {
      for (int y = 1; y <= 10; y++)
      {
         WriteLine(y);
      }
   }
}

Result


Related Tutorials