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
Which computer can be used where there is no regular electricity?​
alina1380 [7]

Answer:

A mechanical computer

Explanation:

Created from gears and levers

7 0
2 years ago
The domain in an email message tells you the
bezimeni [28]
The question is asking to choose among the following choices that state what would the domain in an email represents, base on my research, I would say that the answer would be letter B. location of the destination. I hope you are satisfied with my answer and feel free to ask for more 
8 0
3 years ago
Objects of the calculator class require no additional information when created. define an object named calc, of type calculator.
Grace [21]

Answer

calculator calc;

Explanation

An object is an instance of a class. And a class is what defines or describes the behavior or the state of the object of its type. When a class is defined no memory is allocated until when an object is created memory is allocated.

4 0
3 years ago
Read 2 more answers
Are engineers who help to develop products and projects by creating technical drawings
Alinara [238K]

Answer:

This is true but an Engineer is much more than that. They are the professionals of engineering, who do the invention, analyze, design and test complex systems, machines, structures, machines for fulfilling the functional objectives gadgets as well as the requirements while taking into consideration the limitations that come up due to practicality, safety, regulations, and cost.

Explanation:

Please check the answer section.

8 0
3 years ago
Tim is in charge of the upcoming interschool baketball tournamnent. He wants to arrange all of the teams and their members in al
Scorpion4ik [409]
C sort will be the answer
5 0
2 years ago
Other questions:
  • EXPLAINING A URL
    15·1 answer
  • A built-in tool that enables you to use text to type in commands for the operating system is called the _____ prompt.
    10·2 answers
  • What are 3 characteristics of syndrome E?
    13·1 answer
  • Kevin manages the security for his company and is working to implement a kernel integrity subsystem for key servers. Of the foll
    9·1 answer
  • A domain name is used to: *
    15·1 answer
  • Question 2 (1 point)
    8·1 answer
  • An IT suspects that an unauthorized device is connected to a wireless network. This is a result of pastry sharing on a device br
    13·1 answer
  • Can you please help me
    9·1 answer
  • At Greenwood ATCT, arrival information need NOT be forwarded while FDIO is operational unless the sequence of aircraft changes a
    6·1 answer
  • write a recursive bool valued function containsvowel that accepts a string and returns true if the string contains a vowel
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!