Write a program to show following output depending upon input n.
See the video for solution
You can get a clear idea about basic structure of loop from this video. It will be helpful for you.
Feel free to make comments about this video.