Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help understanding how to do the things that are asked in the problem. Thank you in advance! PLEASE REA I'm in a beginning

image text in transcribedimage text in transcribedimage text in transcribed

image text in transcribedimage text in transcribed

I need help understanding how to do the things that are asked in the problem. Thank you in advance!

PLEASE REA I'm in a beginning class and we're learning how to make very simple C++ programs using Putty Below is a program that we have already worked on in class. I need to solve the problems given based on the program we have already done and add onto it. Here is the program already done in lecture: #include #include using namespace std: int main () // declare variable string name: string date; string item; double price: double total: double itax: const double TAX-7.75; //make a con tant //prompt the user to enter their name cout name //prompt the user to enter the date cout >date; //prompt the user to enter the item name cout > item; /prompt the user to enter the price of the item cout> price: = (price *TAX/ 100) +price ; price (TAX/100) total //set the total equal to the tax on the item plu the price of the item itax :loutput dashed line 30 spaces long cout > ch; //Your code from the last lab follows the program info...". b) No matter how many times you press , the program won't continue. You are stuck! Fix this problem. (HINT: You cannot use cin. Refer to page 12 in "lecture notes 2-3".) c) In the original receipt program you made in the last lab, the user entered a sales person's first name only as the first input. Change your program so the user can enter a sales person's full name (such as Mike Smith). (Refer to page 12 to 14 in "lecture notes 2-3") d) Now you are to change the order of the inputs. Get today's date first then the sales person's name next followed by the item name and price. You should still be using cin to get today's date (cin >>date). Sample run from the new program Enter today's date (mm/dd/yy): 09/30/2011 Enter sales person's name: Mike Smith Enter the item name: M&Ms Enter the price of the item 1.56 If you don't get a chance to enter a sale's person's full name, you forgot to use something... Refer to page 13 to 14 in "lecture notes 2-3". e) In the original receipt program, we let the user enter only one word for an item name. Change your program so the user can enter multiple words for an item name, such as "egg salad sandwich" Sample run from the new program Enter today's date (mm/dd/yy: 09/30/2011 Enter sales person's name: Mike Smith Enter the item name: Egg salad sandwich Enter the price of the item 1.56 f) Notice you don't need ignore0 before you read an item name. Why

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

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions