Lesson 5 – Decision based output generation

This lesson is simply a combination of two basic building blocks. It is a simple demonstration of how basic structures can be combined to write a complete program.

In the program first, scanf is used to take input in a variable and then the if-else structure is used to print the output depending upon the value of the user input variable.