Create a C++ programme that displays the following menu: 1. Determine the Area of a Circle 2. Calculate the tax based on the user's input for the price and tax rate of an item. 3. Convert one pound to one kilogramme 4. Quit Enter your choice (1-4): If the user enters 1, the programme should ask for their name, followed by the radius of their choice. the circular shape The programme should then display (print) the user's name and the area of the circle, which should be limited to two decimal points. Validation of input: Your programme should only accept positive numbers. If the user enters 2, the programme should prompt them for their name, price, and tax rate. The programme should then calculate the tax based on the price and print the user's name and the tax amount, which should be limited to two decimal points. Validation of input: Your programme should only accept positive numbers. If the user enters 3, the programme should prompt the user for his or her name and the number of pounds. Your programme should convert a pound to a kilogramme and print the user's name as well as the result in Kilogram with only two decimal points. When accepting input for pounds, your programme should ONLY accept positive numbers. The programme should exit if the user enters 4. Once completed, the programme should ask the user if they want to repeat the program, and if the user responds 'Y' or 'y,' the programme should display the menu and prompt the user to make another selection using a do-while loop. More Input Validation: When selecting an item from the menu, display an error message if the user enters a number outside the range of 1 through 4 or a char or a string.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 28PE
icon
Related questions
Question
Create a C++ programme that displays the following menu: 1. Determine the Area of a Circle 2. Calculate the tax based on the user's input for the price and tax rate of an item. 3. Convert one pound to one kilogramme 4. Quit Enter your choice (1-4): If the user enters 1, the programme should ask for their name, followed by the radius of their choice. the circular shape The programme should then display (print) the user's name and the area of the circle, which should be limited to two decimal points. Validation of input: Your programme should only accept positive numbers. If the user enters 2, the programme should prompt them for their name, price, and tax rate. The programme should then calculate the tax based on the price and print the user's name and the tax amount, which should be limited to two decimal points. Validation of input: Your programme should only accept positive numbers. If the user enters 3, the programme should prompt the user for his or her name and the number of pounds. Your programme should convert a pound to a kilogramme and print the user's name as well as the result in Kilogram with only two decimal points. When accepting input for pounds, your programme should ONLY accept positive numbers. The programme should exit if the user enters 4. Once completed, the programme should ask the user if they want to repeat the program, and if the user responds 'Y' or 'y,' the programme should display the menu and prompt the user to make another selection using a do-while loop. More Input Validation: When selecting an item from the menu, display an error message if the user enters a number outside the range of 1 through 4 or a char or a string.
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Mathematical functions
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
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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
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,