Answer to Question #320397 in C# for kun

Question #320397

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



7 6 5 4 3 2 1



7 6 5 4 3 2



7 6 5 4 3



7 6 5 4



7 6 5



7 6



7

1
Expert's answer
2022-03-29T11:40:15-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 <= 7; i++)
            {
                for (int j = 7; 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