Conditional Statements

If-Then-Else



Description

This program illustrates conditional statements... causing a program to "make decisions"... to compute different things based on values in variables.

It illustrates these new concepts:

  1. if-then-else statement

Input

The user will be asked to give a number.

Output

The program will report is the input number is less than 100, and if so it will produce a result twice the input value. If the input number is 100 or more, it will report that, and produce a result that is 20 larger than the input.

Termination

The program ends automatically after one input.