C# Loop Exercises - Practice Question

In this chapter you will learn In this chapter, there are some programmings exercises are given below. It is recommended you 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 users to whether continue or not. If user presses 'y' or 'Y' then continue and again accept a number. If a 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#.

 

Share your thought