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.
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
Related questions
Concept explainers
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
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
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 3 images
Knowledge Booster
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.Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,