Question

Computer science help! A software company sells their software packages for $99.00 each. They would like...

Computer science help!

A software company sells their software packages for $99.00 each. They would like you to write a program that will calculate and display an invoice for their customers. Quantity discounts are given according to the following table:

Quantity   Discount

1 - 9 No discount

10 – 19 20%

20 – 49 30%

50 - 99 40%

100 or more 50%

Write a C++ program that asks for the customer’s name and the number of software packages sold and computes the total cost of the purchase. Sales tax is 6.5%.

Display an invoice for the customer detailing the customer’s name, the number of software packages purchased, the discount percentage received, the cost of the software packages, the discounted amount received, the total sales, the sales tax, and the total cost of the purchase. (Use appropriate formatting and named/symbolic constants.)

Sample Input/Output:

Please enter the Customer’s Name: Smith CPA Services

Please enter the total number of software package(s) purchased: ? 34

INVOICE for Smith CPA Services

Quantity: 34

Discount: 30.00 %

Software Cost (34 packages at $99.00 each)…….…..$ 3366.00

Discount…………………………………………….....$ 1009.80

------------

Total Sales…………………………………….………$ 2356.20

Sales Tax…………………………………………….. $ 153.15

------------

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Program:

#include <iostream>

#include<string>

using namespace std;

int main() {

string name;//to hold customrer name

cout<<"Please enter the Customer’s Name:";

getline(cin,name);//reading cutomer name

int n;//to hold quantity

double d=0.00;//to hold discount

cout<<"Please enter the total number of software package(s) purchased: ?";

cin>>n;//reading qunatuty//determining discount rate

if(n>=10 && n<=19)

d=20.00;

else if(n>=20 && n<=49)

d=30.00;

else if(n>=50 && n<=99)

d=40.00;

else if(n<9)

d=0.00;

else

d=50.00;

//calculating and printing result

double totalPrice=(n*99);

double discountedPrice=(totalPrice*d)/100;

double taxAmount=(totalPrice-discountedPrice)*0.065;

cout<<"INVOICE for "<<name;

cout<<" Quantity:"<<n;

cout<<" Discount:"<<d<<"%";

cout<<" Software Cost ("<<n<<"packages at $99.00 each)…….…..$"<<totalPrice;

cout<<" Discount…………………………………………….....$"<<discountedPrice;

cout<<" .......................";

cout<<" Total Sales…………………………………….………$"<<(totalPrice-discountedPrice);

cout<<" Sales Tax…………………………………………….. $"<<taxAmount;

}

Output:

Add a comment
Know the answer?
Add Answer to:
Computer science help! A software company sells their software packages for $99.00 each. They would like...
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
  • Part II – Cost Calculator (15 Points) A software company sells a package that retails for...

    Part II – Cost Calculator (15 Points) A software company sells a package that retails for $ 99. Quantity discounts are given according to the following table: Quantity Discount 10 to 19 20% 20 to 49 30% 50 to 99 40% 100 or more 50% Write a program that asks the user to enter the number of packages purchased. The program should then display the discount percentage, amount of the discount (can be 0) and the total amount of the...

  • NOTE: All C++ programs that you write must have comments at the top with the program...

    NOTE: All C++ programs that you write must have comments at the top with the program name, your name, and the pseudocode describing what the program will do. 1. Create a new program that will calculate the total cost for software purchased from a store. Each software package costs $99.00, but discounts are given on the total cost, based on the number of packages purchased. a. Ask the user for the number of packages they want to buy b. Calculate...

  • <Program 1: 50 points> software.cpp A software company sells a package that retails for $99. Quantity...

    <Program 1: 50 points> software.cpp A software company sells a package that retails for $99. Quantity discounts are given according to the following table. Quantity Discount 10-19 20% 20-49 30% 50-99 40% 100 or more 50% Write a program that asks for today's date (you MUST use cin >> date. Do not use getline(cin, date)), the company name and the quantity they wish to buy and computes the total cost of the purchase. If the user enters a negative value...

  • Code in c++ please Q1: Software Sales A software company sells a package that retails for...

    Code in c++ please Q1: Software Sales A software company sells a package that retails for $99. Quantity discounts are given according to the following table: QuantityDiscount 10-19 20-49 50-99 100 or more 20% 30% 40% 50% : Write a program that asks for the number of units sold and computes the total cost of the purchase. Input validation: Make sure the number of units is greater than 0. Q2: Book Club Points Community Booksellers has a book club that...

  • Q4 130 Quantity discounts are given according to the following table O points) A software company...

    Q4 130 Quantity discounts are given according to the following table O points) A software company sells one software package regularly for 99 QR Quantity Discount 20% 10-19 20-49 50-99 |00 or more 40% 50% write ρ program that asks for the number of items sold, and computes the total cost of the purchase. if the user enters an invalid number of items, the program displays invalid Purchasel" message. Sample output Enter number of items: 25 Total cost is 1732.5...

  • excel for accounting Buckeye Company sells three products and offers quantity discounts to the customers. Buckeye...

    excel for accounting Buckeye Company sells three products and offers quantity discounts to the customers. Buckeye Company wants you to make a worksheet that will allow the salesperson (the user) to input the item and the quantity of the item that their customer wants to purchase. The worksheet will then calculate a price quote that the salesperson can give to the customer. The three products and the selling price are as follows: Item Unit Price Portable hard drive $99.00 Thumb...

  • Rita Jekyll operates a sales booth in computer software trade shows, selling an accounting software package,...

    Rita Jekyll operates a sales booth in computer software trade shows, selling an accounting software package, Abacus. She purchases the package from a software company for $160 each. Booth space at the convention hall costs $10,000 per show. Required Sales at past trade shows have ranged between 400 and 600 software packages per show. Determine the average cost of sales per unit if Ms. Jekyll sells 400, 450, 500, 550, or 600 units of Abacus at a trade show. Use...

  • Python Language 3. Shipping Charges The Fast Freight Shipping Company charges the following rates (per 500...

    Python Language 3. Shipping Charges The Fast Freight Shipping Company charges the following rates (per 500 miles shipped): 1. Number Guessing Game Write a program for players to guess the number that the program randomly generated. Your program should randomly generate an integer between 1 and 10. After a player guessing a number, your program should display "Too small", "Too large", or "That's it!". Weight of Package (in Kilograms) 2 kg or less Over 2 kg but not more than...

  • Assume that you are developing a billing software for a departmental store which sells electronic appliances,...

    Assume that you are developing a billing software for a departmental store which sells electronic appliances, clothing, and toys. The store offers discounts on a festival occasion as below: a) 20 % discount on electronic appliances whose prices are greater than or equal to $100 b) 30 % discount on clothing if the price of a clothing item is greater than or equal to $50 c) All the toys greater than or equal to $20 are subject to 10% discount....

  • A store sells cups and plates for parties. The owners want a program that allows them...

    A store sells cups and plates for parties. The owners want a program that allows them to enter the price of a cup, the price of a plate, the number of cups purchased, the number of plates purchased, and the sales tax rate. The program should calculate and display the total cost of the purchase. desk check the pseudocode

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