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#.

More Articles

 

Share your thought



PLEASE DISABLE ADBLOCKER AND SUPPORT US!

Please support us by enabling ads on this page. Refresh

YOU DON'T LIKE ADS, WE ALSO DON'T LIKE ADS!
 
But we have to show ads on our site to keep it free and updated. We have to pay huge server costs, domain costs, CDN Costs, Developer Costs, Electricity and Internet Bill. Your little contribution will encourage us to regularly update this site.