Very Simple C++ programs – Nested loops Demonstration/Examples

Here are some extremely simple programs in C++ for absolute beginner students. I hope these would help them understand how nested loops work in programming. The required pattern of numbers to be printed on screen by a specific program is given before the source code to serve a problem statement.

1)
Required Pattern
1
12
123
1234
12345

Continue reading Very Simple C++ programs – Nested loops Demonstration/Examples

A Python Program to print multiplication table of any natural number

I am just beginning in the world of computer programming with python as my first language. Yesterday, I wrote a very simple program which, when executed, ask us for a number whose table we want to print, then a number from where we want to start the table and finally a number up to which the table will be printed. The source code of the program is:

A sample execution of this program in my python shell looks something like this: