Question
C++ please help thank you so much

the results Prog ram Overview: This program will calculate and output ordering products from a vendor. This will include calc
roughly 30, 15, 15, and 20 characters wide. Remember to subtract the space of the border characters from each setw(). - The s
0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include<iostream>
#include<iomanip>
using namespace std;

int main()
{
   const double sales_tax = 0.081;
   int red_dragon_count, blue_chrysa_count, vermilion_count, sparkler_count;
   cout << "Bill and Mary's Questionable Fireworkks Emporium Order System" << endl;
   cout << "How many Red Dragons would you like to order?"<<endl;
   cin >> red_dragon_count;
   cout << "How many Blue Chrysanthemums would you like to order?"<<endl;
   cin >> blue_chrysa_count;
   cout << "How many Vermilion would you like to order?" << endl;
   cin >> vermilion_count;
   cout << "How many Sparkler Boxes would you like to order?"<<endl;
   cin >> sparkler_count;

   double subTotal, total, Tax;
   subTotal = red_dragon_count * 12.99 + blue_chrysa_count * 14.99 + vermilion_count * 19.49 + sparkler_count * 4.25;
   Tax = subTotal * sales_tax;
   total = subTotal - Tax;
   cout << fixed;
   cout<<setprecision(2);
   cout << setw(30)<<left<<"Item Name"<<setw(15)<<right<<"Unit Cost"<<right<<setw(15)<<"Ordered"<<right<<setw(20)<<"Amount\n";
   cout << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
   cout << setw(30) << left << "+ Red Dragon +" << setw(15) << right<<"12.99 +" << setw(15) << right << red_dragon_count << "+"<<setw(20) << right << red_dragon_count * 12.99 << " + "<<endl;
   cout << setw(30) << left << "+ Blue Crysenthemum +" << setw(15) << right<<"14.99 +" << setw(15) << right << blue_chrysa_count << "+"<<setw(20) << right << blue_chrysa_count * 14.99 << " + " << endl;
   cout << setw(30) << left << "+ Vermilion Lotus +" << setw(15) <<right<< "19.45 +" << setw(15) << right << vermilion_count << "+"<<setw(20) << right << vermilion_count * 19.49 << " + " << endl;
   cout << setw(30) << left << "+ Sparkler Box +" << setw(15) << right<<" 4.25 +" << setw(15) << right << sparkler_count << "+"<<setw(20) << right << sparkler_count * 4.25<< " + " << endl;
   cout << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
   cout << fixed;
   cout<<setprecision(2);
   cout << "+"<<right << setw(60)<<"SubTotal +" << setw(20)<<right<<subTotal << "+"<<endl;
   cout << "+"<<right << setw(60)<<"Tax(8.1%) +" << setw(20) << right<<Tax<< "+" << endl;
   cout << "+"<<right <<setw(60) << "Total +" << setw(20) << right<<total << "+" << endl;
  
   cout << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
}

/*
Bill and Mary's Questionable Fireworkks Emporium Order System
How many Red Dragons would you like to order?
1000
How many Blue Chrysanthemums would you like to order?
985
How many Vermilion would you like to order?
40
How many Sparkler Boxes would you like to order?
15000
Item Name Unit Cost Ordered Amount
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Red Dragon + 12.99 + 1000+ 12990.00 +
+ Blue Crysenthemum + 14.99 + 985+ 14765.15 +
+ Vermilion Lotus + 19.45 + 40+ 779.60 +
+ Sparkler Box + 4.25 + 15000+ 63750.00 +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ SubTotal + 92284.75+
+ Tax(8.1%) + 7475.06+
+ Total + 84809.69+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

*/

Add a comment
Know the answer?
Add Answer to:
C++ please help thank you so much the results Prog ram Overview: This program will calculate...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Expert help please. Thank you very much. OFR company is an internet/TV hardware distributor and installation...

    Expert help please. Thank you very much. OFR company is an internet/TV hardware distributor and installation provider is looking to expand beyond the city limits. The company is a B2C entity and counts 4 people (2 people executing sales and telco and hardware installation and support, 1 person responsible for sales and administration of accounting and tax agenda, and 1 person entirely devoted to telco and hardware technical support). The region where OFR operates counts a population of 100 thousand...

  • Can you help us!! Thank you! C++ Write a program that can be used by a...

    Can you help us!! Thank you! C++ Write a program that can be used by a small theater to sell tickets for performances. The program should display a screen that shows which seats are available and which are taken. Here is a list of tasks this program must perform • The theater's auditorium has 15 rows, with 30 seats in each row. A two dimensional array can be used to represent the seats. The seats array can be initialized with...

  • **This is for the C Language. Trigonometric Calculator Specification You are required to write a program...

    **This is for the C Language. Trigonometric Calculator Specification You are required to write a program that calculates and displays values of the trigonometric functions sine, cosine, and tangent for user-supplied angular values. The basic program must comply with the following specification. 1. When the program is run, it is to display a short welcome message. TRIG: the trigonometric calculator 2. The program shall display a message prompting the user to enter input from the keyboard. Please input request (h-help,...

  • Please answer every question listed. Thank you SO much. Use the information contained in these financial...

    Please answer every question listed. Thank you SO much. Use the information contained in these financial statements and notes to complete this case. All answers should be for the most current year (September 24, 2016) unless asked otherwise. Many companies show amounts in the thousands or millions - please state amounts as shown on the financial statements. Do not add zeros. You do not need to include dollar signs. Selected financial statements of Apple, Inc. follow. CONSOLIDATED STATEMENTS OF OPERATIONS...

  • Please answer all questions and make answers very clear. Thank you so much and I will...

    Please answer all questions and make answers very clear. Thank you so much and I will make sure to give a good rating!!! Use the information contained in these financial statements and notes to complete this case. All answers should be for the most current year (September 24, 2016) unless asked otherwise. Many companies show amounts in the thousands or millions please state amounts as shown on the financial statements. Do not add zeros. You do not need to include...

  • please help and thank you Materials Needed per class: 1 box of 24 microscope slides of...

    please help and thank you Materials Needed per class: 1 box of 24 microscope slides of meiosis 1 1 box of 24 microscope slides of meiosis 2 red and yellow popbead chromosome kits Objectives To become familiar with the process of meiosis and to be able to identify the principal phases of meiosis To understand how the process of meiosis is similar to mitosis and how it differs from mitosis Introduction The genetic information of a cell is encoded in...

  • Please read the article and answer about questions. You and the Law Business and law are...

    Please read the article and answer about questions. You and the Law Business and law are inseparable. For B-Money, the two predictably merged when he was negotiat- ing a deal for his tracks. At other times, the merger is unpredictable, like when your business faces an unexpected auto accident, product recall, or government regulation change. In either type of situation, when business owners know the law, they can better protect themselves and sometimes even avoid the problems completely. This chapter...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT