Professional Documents
Culture Documents
13 LE04 Decision Tutorial
13 LE04 Decision Tutorial
1. Write a program to ask two inputs from the user. From the number given, you
could perform three selections: addition, multiplication and division. Print the
result based on your choice:
Sampel output:
Please type in two numbers: 12
If the user enters 1, the program should ask for the radius of the circle
and then display its area.
If the user enters 2, the program should ask for the length and width of
the rectangle and then display its area.
If the user enters 3, the program should ask for the base and height of
the triangle and then display its area.
If the user enters 4, the program should end (eg: display thank you)
Formula:
Circles area =r2
Rectangles area = length x width
Triangles area = base x height x 0.5