Question

Write a C++ program which inputs the amount of chairs sold for each of three chair...

Write a C++ program which inputs the amount of chairs sold for each of three chair styles Style Price Per Chair American Colonial $ 85.00 Modern $ 57.50 French Classical $127.75 The program must print the total dollar sales of each style as well as the total sales of all chairs in fixed point notation with two decimal places.

Homework Answers

Answer #1
#include <iostream>
#include <iomanip>

using namespace std;

int main(){
   int a, m, f, aTotal, mTotal, fTotal;
   double total;
   
   cout<<"Number of American Colonial chairs ($ 85.00 each): ";
   cin>>a;
   
   cout<<"Number of Modern chairs ($ 57.50 each): ";
   cin>>m;
   
   cout<<"Number of French Classical chairs ($ 127.75 each): ";
   cin>>f;
   
   cout<<fixed<<setprecision(2);
   aTotal = a*85.00;
   cout<<"Total sales for American Colonial chairs = "<<(aTotal)<<endl;
   total = aTotal;
   
   mTotal = m*57.50;
   cout<<"Total sales for Modern chairs = "<<(mTotal)<<endl;
   total += mTotal;
   
   fTotal = f*127.75;
   cout<<"Total sales for Modern chairs = "<<(fTotal)<<endl;
   total += fTotal;
   
   cout<<"Total sales of all chairs = "<<total<<endl;
   
    return 0;
}

Know the answer?
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
Similar Questions
Write a C++ program that asks the user to enter in three numbers and displays the...
Write a C++ program that asks the user to enter in three numbers and displays the numbers in ascending order. If the three numbers are all the same the program should tell the user that all the numbers are equal and exits the program. Be sure to think about all the possible cases of three numbers. Be sure to test all possible paths. Sample Runs: NOTE: not all possible runs are shown below. Sample Run 1 Welcome to the order...
I was asked to write a program in CodeBlocks. C++ format. I've written the first half...
I was asked to write a program in CodeBlocks. C++ format. I've written the first half of the code but I am using else and if statements. I feel like the code is too long to do a simple calculation. In CodeBlock when you build and run your code, a new terminal window opens (in windows a new console window) and you can enter your inputs there. It is not like eclipse that you enter your inputs in console view....
c++ Program Description You are going to write a computer program/prototype to process mail packages that...
c++ Program Description You are going to write a computer program/prototype to process mail packages that are sent to different cities. For each destination city, a destination object is set up with the name of the city, the count of packages to the city and the total weight of all the packages. The destination object is updated periodically when new packages are collected. You will maintain a list of destination objects and use commands to process data in the list....
Need in C language also need full documentation/explanation of each line A student has established the...
Need in C language also need full documentation/explanation of each line A student has established the following monthly budget: Budget Categories Budgeted amount ----------------------------------------------------- Housing $ 580.00 Utilities $ 150.00 Household Expenses     $ 65.00 Transportation $ 50.00 Food $ 250.00 Medical $ 30.00 Insurance $ 100.00 Entertainment $ 150.00 Clothing $ 75.00 Miscellaneous $ 50.00 ---------------------------------------------------- Write a program that declares a MonthlyBudget structure designed with member variables to hold each of these expense categories. The program should define...
Kimmel Gnomes DATE:​March 1, 2018 TO:​CCSU Consulting FROM:​Candice Kimmel, President, Kimmel Gnomes SUBJECT:​Master Budget for the...
Kimmel Gnomes DATE:​March 1, 2018 TO:​CCSU Consulting FROM:​Candice Kimmel, President, Kimmel Gnomes SUBJECT:​Master Budget for the fiscal year July 1, 2018 – June 30, 2019 ---------------------------------------------------------------------------------------------------------------------------------- Our controller, Richard Kimmel is negotiating with potential new Clay suppliers in Kentucky. We need the Large Gnome Division’s Master Budget for the fiscal year ended June 30, 2019 for our corporate strategic planning process, and we cannot wait for Richard’s return from Kentucky. We would like you to prepare the Large Gnome Division’s...
Review the Robatelli's Pizzeria Case Study. Develop another internal controls system, but this time, in the...
Review the Robatelli's Pizzeria Case Study. Develop another internal controls system, but this time, in the purchases and fixed assets business areas. Prepare a 12- to 16-slide presentation describing the purchases and fixed assets business areas. Be sure to incorporate speaker notes as well as appropriate visuals, graphics, fonts, etc. Include any associated risk in these areas. Describe specific internal controls that include authorization of transactions, segregation of duties, adequate records and documentation, security of assets, and independent checks and...
Argentina and Ecuador: Understanding the Currency Crisis While fiscal policy is never far from the mind...
Argentina and Ecuador: Understanding the Currency Crisis While fiscal policy is never far from the mind of your average Argentine, who remembers the tough times and hyperinflation of the 1980s, the events of 2001 and 2002 have brought fiscal policy back to the forefront of public concern. Though the early 1990s may have been characterized by financial optimism, Argentina has been in a recession since Brazil's 1998 monetary crisis sent shockwaves across the regional and global markets. In early 2002,...
      MK Restaurant: Branding of Thai-Style Hotpot The restaurant industry is one of the most...
      MK Restaurant: Branding of Thai-Style Hotpot The restaurant industry is one of the most competitive in Thailand. With a large number of players ranging from restaurants in five-star hotels, global fast-food chains to small stalls along the streets and everything in between, the Thais are spoiled for choice. In addition, as the world becomes globalized, consumers are familiar with international dishes and would not hesitate to try new offerings from the other side of the globe. As a...
Mattel Responds to Ethical Challenges Business Ethics This case was written by Debbie Thorne, John Fraedrich,...
Mattel Responds to Ethical Challenges Business Ethics This case was written by Debbie Thorne, John Fraedrich, O. C. Ferrell, and Jennifer Jackson, with the editorial assistance of Jennifer Sawayda. This case was developed for classroom discussion rather than to illustrate either effective or ineffective handling of an administrative, ethical, or legal discussion by management. All sources used for this case were obtained through publicly available material. Mattel, Inc. is a world leader in the design, manufacture, and marketing of family...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary rivals? How will the acquisition of Reebok by Adidas impact the structure of the athletic shoe industry? Is this likely to be favorable or unfavorable for New Balance? 2- What issues does New Balance management need to address? 3-What recommendations would you make to New Balance Management? What does New Balance need to do to continue to be successful? Should management continue to invest...