Nested Loop Help

Joined
Oct 25, 2014
Messages
12
Programming Experience
Beginner
im a beginner to c#. can any one help how this loop is working.
please and thankyou.

C#:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication9
{
    class Program
    {
        static void Main(string[] args)
        {
                for (int i = 0; i <= 9; i++)
                  {
                for (int j = 0; j <=i; j++)
                {
                    Console.Write("{0} {1}", i, j);
                }
                Console.WriteLine();
                }
                Console.ReadKey();

            }
        }
    }

Untitled.png
 
Last edited:
Back
Top Bottom