1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mars1129 [50]
3 years ago
12

Write a program to create a customer bill for a company. The company sells only five products: TV, DVD player, Remote Controller

, CD Player, and Audio Visual Processor. The unit prices are $500.00, $380.00, $35.20, $74.50, and $1500.00, respectively. Part I ( this part is not that much different from Lab 2, as far as formatting) Prompt the user and input for the quantity of each product sold. Calculate the Subtotal for each item and the Subtotal of the bill. Calculate the Tax on the Bill Subtotal. Last calculate the grand Total of Subtotal plus Tax. Test Data sets: 13, 2, 3, 1, 21 Sample Outputs: How many TVs were sold? 13 How many DVD players were sold? 2 How many Remote Controller units were sold? 3 How many CD Players were sold? 1 How many AV Processors were sold? 21
Computers and Technology
1 answer:
Goshia [24]3 years ago
3 0

Answer:

A program written in C++ was create for a customer bill for a company. the company sells five products, which are TV, DVD player, Remote Controller, CD Player, and Audio Visual Processor.

The code is implemented and shown below in the explanation section

Explanation:

<em>Solution:</em>

The C++ Code:

#include<iostream>

#include<string>

#include<iomanip>

using namespace std;

#define taxrate 8.75

int main(){

const double upTv = 500.00;

const double upDvdPlayer = 380.00;

const double upRemoteController = 35.00;

const double upCdPlayer = 74.00;

const double upAudioVideoProcessor = 1500.00;

cout << "How many TVs were sold? ";

double ntv;

cin >> ntv;

cout << "How many DVD players were sold? ";

double ndvd;

cin >> ndvd;

cout << "How many Remote Controllers were sold? ";

double nrc;

cin >> nrc;

cout << "How many CD Players were sold? ";

double ncd;

cin >> ncd;

cout << "How many AV Processors were sold? ";

double nav;

cin >> nav;

double ptv = ntv * upTv;

double pdvd = ndvd * upDvdPlayer;

double prc = nrc * upRemoteController;

double pcd = ncd * upCdPlayer;

double pav = nav * upAudioVideoProcessor;

double tp = ptv + pdvd + prc + pcd + pav;

cout << setw(5) << left << "QTY";

cout << setw(20) << left << "Description";

cout << setw(15) << left << "Unit Price";

cout << setw(15) << left << "Price" << endl;

cout << setw(5) << left << (int)ntv;

cout << setw(20) << left << "TV";

cout << setw(15) << left << fixed << setprecision(2) << upTv;

cout << setw(15) << left << fixed << setprecision(2) << ptv << endl;

cout << setw(5) << left << (int)ndvd;

cout << setw(20) << left << "DVD";

cout << setw(15) << left << fixed << setprecision(2) << upDvdPlayer;

cout << setw(15) << left << fixed << setprecision(2) << pdvd << endl;

cout << setw(5) << left << (int)nrc;

cout << setw(20) << left << "Remote Controller";

cout << setw(15) << left << fixed << setprecision(2) << upRemoteController;

cout << setw(15) << left << fixed << setprecision(2) << prc << endl;

cout << setw(5) << left << (int)ncd;

cout << setw(20) << left << "CD Player";

cout << setw(15) << left << fixed << setprecision(2) << upCdPlayer;

cout << setw(15) << left << fixed << setprecision(2) << pcd << endl;

cout << setw(5) << left << (int)nav;

cout << setw(20) << left << "AV Processor";

cout << setw(15) << left << fixed << setprecision(2) << upAudioVideoProcessor;

cout << setw(15) << left << fixed << setprecision(2) << pav << endl;

cout << setw(15) << left << "SUBTOTAL";

cout << setw(15) << left << fixed << setprecision(2) << tp << endl;

cout << setw(15) << left << "TAX";

cout << setw(15) << left << fixed << setprecision(2) << taxrate << endl;

double ttp = tp + 0.0875 * tp;

cout << setw(15) << left << "Total";

cout << setw(15) << left << fixed << setprecision(2) << ttp << endl;

return 0;

}

You might be interested in
After you set a goal or purpose for your Web site, what is the next step to designing your​ pages​?
Hatshy [7]

Answer:

et your goal.

Choose a website builder.

Define your layout.

Claim your domain name.

Gather your content.

Add the right pages.

Design your website elements.

Pick the professional tools you need.

Explanation:

7 0
2 years ago
kayah has created a website that explains what her business does. what type of computer program is needed to access/view kayah's
soldier1979 [14.2K]

Answer:

web browser

Explanation:

A web browser is a program that allows users to view and explore

information on the World Wide Web.

8 0
3 years ago
Read 2 more answers
What is the full form of HTML​
Naya [18.7K]

Answer:

hypertext markup language

3 0
3 years ago
Read the scenario below. Explain why this is not fair use of copyright materials. What should you do instead of using the entire
Thepotemich [5.8K]

Answer:

You did not buy the rights to the copyrighted material when you bought it from Apple Music

Explanation:

When you bought the song from Apple Music, you paid them for your using of the song to listen to, as stated in the agreement that you wouldve been required to agree to. Apple is only allowed to provide the material for personal use to its users, with it part of its fees going to the original copyright holders.

8 0
4 years ago
What is a high level language?​
vovikov84 [41]

Answer:

a high level language is any programming language that enables development of a program in a much more user friendly programming context and is generally independent of the computers hardware architecture.

8 0
3 years ago
Read 2 more answers
Other questions:
  • Josh needs to write a research report for his Civics class. Which file type will allow him to save his file?
    12·2 answers
  • You are able to change the formatting of a table after it is inserted into a placeholder. True or false
    9·2 answers
  • The IBM 370 mainframe computer was introduced in 1970. The 370 Model 145 could hold up to 524,288 bytes of data (512 Kbytes). It
    8·1 answer
  • Alisha's teacher usually includes lots of comments on student tests to help them understand why their answers were
    8·2 answers
  • A GPO component that’s an Active Directory object stored in the System\Policies folder. The GPC stores GPO properties and status
    14·1 answer
  • After you have created at least four slides, a scroll bar containing scroll arrows and scroll boxes will appear on the right edg
    9·1 answer
  • Choose the answer. Janice's IT department found that her computer had a program on it that was collecting her personal informati
    5·1 answer
  • How to look at things you previously applied to on handshake
    13·1 answer
  • What is ?
    9·2 answers
  • John has recently retired from an administrative, yet technical job which he held for 40 years. He decided to pursue a life-long
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!