I'm really lost this time

I am extremely lost with this programming assignment. Can anyone guide me? I am using Xcode.
Section 1 : Show a menu and receive a selection from a user.
Section 2 : Enter real number(s) for the measurement.
Section 3 : Calculate the size of the area, based on the selection.
Display the answer.
Section 4 : Repeat Section 1 through Section 3 until user specifies
“Exit”.
*/
// Write your own program.

Here is the "expected output"
Welcome to Area calculator.
Please select a function to be performed:
C/c: circle
T/t: triangle
P/p: parallelogram
R/r: rectangle
E/e: Exit.
Please enter your selection: C
You selected circle.
Please enter raduis : 2.5
The area of a circle with radius 2.5 = 19.635
Please select a function to be performed:
C/c: circle
T/t: triangle
P/p: parallelogram
R/r: rectangle
E/e: Exit.
Please enter your selection: t
You selected triangle.
Please enter base and height separated by a space : 1.8 2.05
The area of a triangle with base 1.8 and height 2.05 = 1.845
Please select a function to be performed:
C/c: circle
T/t: triangle
P/p: parallelogram
R/r: rectangle
E/e: Exit.
Please enter your selection: P
You selected parallelogram.
Please enter base and height separated by a space : 3.6 0.78
The area of a parallelogram with base 3.6 and height 0.78 = 2.808
Please select a function to be performed:
C/c: circle
T/t: triangle
P/p: parallelogram
R/r: rectangle
E/e: Exit.
Please enter your selection: R
You selected rectangle.
Please enter length and width separated by a space : 5.8 1.4
The area of a rectangle with length 5.8 and width 1.4 = 8.12
Please select a function to be performed:
C/c: circle
T/t: triangle
P/p: parallelogram
R/r: rectangle
E/e: Exit.
Please enter your selection: q
You entered invalid selection.
Please select a function to be performed:
C/c: circle
T/t: triangle
P/p: parallelogram
R/r: rectangle
E/e: Exit.
Please enter your selection: e
Program terminates. Good Bye.
Press any key to continue . . .
Last edited on
Topic archived. No new replies allowed.