C# Loop Exercises – Practice Question

practicenote-01
In this chapter you will learn

In this chapter, there are some programmings exercises are given below. It is recommended you to solve all the programming problems using loop constructs. It will enhance your programming skills.

Qu 1.Input a number from user and displays power of the number. Ask user’s to whether continue or not. If user presses ‘y’ or ‘Y’ then continue and again accept a number. If user presses any other characters or numbers then quit. (Use while loop)
Qu 2. Using for loop print the following output on console.

        1
      121
    12321
  1234321
123454321

  • Qu 3. Using for loop print the following output on console.

            1
          121
        12321
      1234321
    123454321
      1234321
        12321
          121
            1

    Summary

    In this chapter you did some programming exercises of loop constructs in C#. In next session you will learn about Encapsulation and Abstraction in C#.


    3 thoughts on “C# Loop Exercises – Practice Question”

    Leave a Reply

    Your email address will not be published. Required fields are marked *