1. Program the following. Ask User to select one option from the following. Calculate area of Circle [c] Calculate area of Rectangle [r] • Calculate area of Triangle [t] O If user enters c then ask user to enter radius and calculate area using following formula. A = ar O If user entersr then ask user to enter length & width and calculate area using following formula. A = wl O If user enterst then ask user to enter base & height and area using following formula. h, b A Display the area.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question

Language C

1. Program the following.
Ask User to select one option from the following.
Calculate area of Circle [c]
Calculate area of Rectangle [r]
Calculate area of Triangle [t]
O If user enters c then ask user to enter radius and calculate area using following
formula.
A = ar
O. If user entersr then ask user to enter length & width and calculate area using
following formula.
A = wl
O If user enterst then ask user to enter base & height and area using following
formula.
h, b
A =
2
Display the area.
Transcribed Image Text:1. Program the following. Ask User to select one option from the following. Calculate area of Circle [c] Calculate area of Rectangle [r] Calculate area of Triangle [t] O If user enters c then ask user to enter radius and calculate area using following formula. A = ar O. If user entersr then ask user to enter length & width and calculate area using following formula. A = wl O If user enterst then ask user to enter base & height and area using following formula. h, b A = 2 Display the area.
Expert Solution
steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
Introduction to computer system
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT