Recent Posts
recent

Write a Program to arrange numbers

Write a Program to arrange numbers in below order

1
2 3
4 5 6
7 8 9 10

using system;
class program
{
static void main()

{
int i, j, k=0;
for (i=1; 1<=5; i++)
{
for(j=1; j<=i; j++)
{
k=k+1;
Console.Write(j+" ");
}
console.writeline();
}
}
Console.Readline();
}

Unknown

Unknown

No comments:

Post a Comment

Powered by Blogger.