Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program in JavaScript please Write a program that asks the user which of the following 7 shapes they would like to calculate the Exercise 1:

Program in JavaScript please image text in transcribed
image text in transcribed
Write a program that asks the user which of the following 7 shapes they would like to calculate the Exercise 1: area of. You can decide how the user makes the decision (entering the name of the shape, or a number representing a shape, etc.) Once the user has made the decision, ask the user for the input variables required to calculate the chosen shape (e.g. if the user picks the square, only the side s will need to be asked for. If the user picks the trapezoid, the user should be asked to enter values for a, b, and h. Calculate the appropriate shape and output the area in the console You can decide whether to end the program after one shape calculation, or whether you want to ask the user if they want to calculate another shape. Square Trapezoid (t b Ellipse (a+b) Rectangle MacBook Air Square Trapezoid al bEllipse a+b Rectangle Triangle Circle 2 Parallelogram A=bh

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions