Answer to Question #320394 in C# for kun

Question #320394

Write a program, using nested loops, to display the following:


1


12


123


1234


12345



1
Expert's answer
2022-03-29T11:40:18-0400
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using BankAccountLibrary;




namespace Q212610
{




    class Program
    {


        static void Main(string[] args)
        {




            for (int i = 1; i <= 5; i++)
            {
                for (int j = 1; j <= i; j++)
                {
                    Console.Write(j.ToString());
                }
                Console.WriteLine();
            }
            Console.ReadLine();
        }




    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS