1 // Lab 3 areas.cpp 2 // WRITE A COMMENT BRIEFLY DESCRIBING THE PROGRAM. 3 // PUT YOUR NAME HERE. 4 // INCLUDE ANY NEED

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

1 // Lab 3 areas.cpp 2 // WRITE A COMMENT BRIEFLY DESCRIBING THE PROGRAM. 3 // PUT YOUR NAME HERE. 4 // INCLUDE ANY NEED

Post by answerhappygod »

1 Lab 3 Areas Cpp 2 Write A Comment Briefly Describing The Program 3 Put Your Name Here 4 Include Any Need 1
1 Lab 3 Areas Cpp 2 Write A Comment Briefly Describing The Program 3 Put Your Name Here 4 Include Any Need 1 (57.14 KiB) Viewed 33 times
1 // Lab 3 areas.cpp 2 // WRITE A COMMENT BRIEFLY DESCRIBING THE PROGRAM. 3 // PUT YOUR NAME HERE. 4 // INCLUDE ANY NEEDED FILES HERE. 5 using namespace std; 6 7 int main() 8 { 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 } // DEFINE THE NAMED CONSTANT PI HERE AND SET ITS VALUE TO 3.14159 // DECLARE ALL NEEDED VARIABLES HERE. GIVE EACH ONE A DESCRIPTIVE // NAME AND AN APPROPRIATE DATA TYPE. // WRITE STATEMENTS HERE TO DISPLAY THE 4 MENU CHOICES. // WRITE A STATEMENT HERE TO INPUT THE USER'S MENU CHOICE. // USE AN IF/ELSE IF STATEMENT TO OBTAIN ANY NEEDED INPUT INFORMATION // AND COMPUTE AND DISPLAY THE AREA FOR EACH VALID MENU CHOICE. // IF AN INVALID MENU CHOICE WAS ENTERED, AN ERROR MESSAGE SHOULD // BE DISPLAYED. return 0; Specifications: Create a menu-driven program that finds and displays areas of 3 different objects. The menu should have the following 4 choices: 1 -- square 2 -- circle 3- right triangle 4 -- quit If the user selects choice 1, the program should find the area of a square. If the user selects choice 2, the program should find the area of a circle. If the user selects choice 3, the program should find the area of a right triangle. If the user selects choice 4, the program should quit without doing anything. Sample Run Program to calculate areas of objects 1 -- square circle right triangle. 2 3 4 - quit 2 Radius of the circle: 3.0 Area 28.2743
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply