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
Most search engines provide specific pages on which you can search for____ and
vazorg [7]

Answer: c

Explanation: a

7 0
2 years ago
Read 2 more answers
What do TCP/IP MEAN​
melomori [17]

Answer:IP is internet protocol, every router has one some routers are dynamic which means they change everything the router reboots and some routers are static which means you would have to call your isp(Internet Service Provider) to get it changed.

Explanation: I do illegal things :)

8 0
3 years ago
1. If you purchase the renters insurance policy described above, you bring a suitcase of clothing and other general
Mazyrski [523]

Answer:

I think its c or d

Explanation:

hope this helps

7 0
3 years ago
Addition and subtraction are considered to be ____ operations performed by a computer.
Natali5045456 [20]

Answer:

Mathematical operations

4 0
3 years ago
Convert binary number 11101111.10111 to decimal
Alekssandra [29.7K]

Answer:

N_{10}=239.71875

Explanation:

In order to obtain the decimal number we have to use the next formula:

N_(10)=d*2^{(i)}\\where:\\N=real number\\d=digit\\i=position

(The position to the right of the decimal point we will take it as negative)

Using the formula we have:

N_{10}=(1*2^7+1*2^6+1*2^5+0*2^4+1*2^3+1*2^2+1*2^1+1*2^0+1*2^{-1}+0*2^{-2}+1*2^{-3}+1*2^{-4}+1*2^{-5})

N_{10}=239.71875

7 0
3 years ago
Other questions:
  • Need answers for 11&amp;12. Due today. Thanks.
    14·1 answer
  • How many host ip addresses are available on a network with a subnet mask of 255.255.255.192?
    6·1 answer
  • What registry file contains installed programs' settings and associated usernames and passwords?​?
    13·1 answer
  • What best compares potrait and landscape orientations
    6·1 answer
  • Write a program that prints the U.S. presidential election years from 1792 to present day, knowing that such elections occur eve
    9·1 answer
  • Can Word Processing (WP) programs be used for DTP? Explain your answer
    7·1 answer
  • Aubrey uses the following formula to calculate a required value. Which elements of the formula use mixed cell referencing?
    13·2 answers
  • After assembling a computer system the very first software to be installed is​
    10·2 answers
  • 3. State whether the given statements are true or false. a. The computer is called a data processor because it can store, proces
    13·1 answer
  • Ask the user to input a word. Then, print the first letter, the last letter, and the length of the word on the same line with no
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!