You are on page 1of 1

using system;

class sampleprogram
{
static void Main(string[ ] args)
{
int i=1;
int j;
while (i <= 5)
{
j=1;
while (j <= i)
{
Console.Write( j );
Console.WriteLine(" ");
j++;
}
Console.WriteLine( );
i++;
}
}
}
output:
1
12
123
1234
............................................................
.............................................................
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

You might also like