C++ Programming: From Problem Analysis to Program Design
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN: 9781337102087
Author: D. S. Malik
Publisher: Cengage Learning
Question
Book Icon
Chapter 6, Problem 8PE
Program Plan Intro

Implementation of a program to display the area of rectangle, area of circle and volume of the cylinder by correcting while loop, switch statement the cases written in the switch statement in the given code.

Program Plan:

  • Write a C++ program with a main function and the required set of statements to accomplish the following:

    • Prompts the user to enter a choice.
    • Based on the choice the user will be able to enter the input.
    • Accordingly, the output for area of rectangle, area of the circle and volume of cylinder will be displayed until the user enters -1.

Blurred answer
Students have asked these similar questions
Which of the following are true about looping statements? (A It is a part of a computer program that makes code(s) repeat itself (B It is also known as an iteration statement. (c) An example of a looping statement is the if-else statement. (D An example of a looping statement is the do-while statement. (E) None of the other choices are correct.
Hi All, Stuck on which programming loop to use for this question. 1.) A bug collector collects bugs every day for seven days. Design a program that keeps a running total of the number of bugs collected during the seven days. The loop should ask the user for the number of bugs collected for each day, and when the loops is finished, the program should display the total number of bugs collected. All programming is in Python.
Please fix the errors in this program
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr