Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Title Comment Block i. Create your source code file named main.cpp, and at the very top of the source code use three one line

image text in transcribed

1. Title Comment Block i. Create your source code file named main.cpp, and at the very top of the source code use three one line comments to document your name, date, and the exercise, using the following format: Name: Stephen May Date: 01/31/2021 Exercise: Labei 2. Write a C++ program that performs as a Tuffy Titan Coffee Shop which prompts the user for the number of coffees, then prints a receipt for the purchase. All monetary outputs should have a dollar sign in the front and 2 decimal places. Each cup of coffee is $2.95. The local tax rate is 9.25%. 3. Compile the file using the command below. The -std option tells the compiler that it will use C++ version 17 standards and the -o main option tells the compiler to place the executable code into a file called main. clang++ -std=c++17 main.cpp -o main 4. Run the program using the command below and repeat the steps above until you are satisfied your program output meets the above requirements. I strongly suggest that you run your program using each of the sample outputs below and ensure that all blank lines and new lines are exactly as below. Note that there are 2 blank lines between amount inserted and the dispensed or error output ./main 5. Your output should be formatted to look exactly as the following using the example input: i. Using 3 cups of coffee as the input: *** TUFFY TITAN COFFEE SHOP *** Enter number of cups: 3 ********* RECEIPT ********* Cups: 3 Cost per cup: $ 2.95 Subtotal: $ 8.85 Tax: $ 0.82 Total: $ 9.67 *** THANK YOU *** ii. Using 12 cups of coffee as the input: *** TUFFY TITAN COFFEE SHOP Enter number of cups: 12 RECEIPT ********* Cups: 12 Cost per cup: $ 2.95 Subtotal: $ 35.40 Tax: $ 3.27 Total: $ 38.67 ********** THANK YOU ********

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 Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions