Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ coding Write a program that allows the user to enter two values: a product ID (a letter) and the number of products to be

image text in transcribedc++ coding
Write a program that allows the user to enter two values: a product ID (a letter) and the number of products to be purchased. Your program should use the following table to determine the price of an individual product: Product ID Product Price $1.44 B $13.67 C $23.10 D $3.99 $44.99 Once your program has determined the price of the product, it should calculate the total amount owed: total owed price of individual product number of products purchased Your program should then print out the individual price, the number of items purchased, and the total amount owed. Your program should be able to handle lowercase and uppercase letters. It should alert the user if they enter an invalid product ID or an invalid number of products to purchase (must be greater than 0), and may exit immediately in that case

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

Recognize and describe the steps in the recruiting process

Answered: 1 week ago