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
AleksandrR [38]
3 years ago
6

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. Use output (stream) manipulators: 2 digits after the decimal point g
Computers and Technology
1 answer:
stich3 [128]3 years ago
8 0

Answer:

Explanation:

The following code is written in C++, it asks the user for input on number of units sold and places it in a variable called units_sold. Then it asks for the package price and places that value in a variable called package_price. Finally it multiplies both values together into a variable called final_price and adjusts the decimals.

#include <iostream>

#include <iomanip>

using namespace std;

       int main()

       {

       // Variables

       int units_sold,

       final_price;

       // ask user for number of units sold

       cout << "\nEnter number of units sold: ";

       cin >> units_sold;

       

       //ask for Package price

       cout << "\nEnter Package Price: ";

       cin >> package_price;

       // Total amount before discount

       final_price = units_sold * package_price;

       cout << setprecision(2) << fixed;

       cout << endl;

       return 0;

       }

You might be interested in
Who is Carl Thompson?
pishuonlain [190]
Carl Thompson was a well know Jazz player back in the mid 1900s
7 0
3 years ago
Hardware and software work (blank) to allow user to form of function?
Nadya [2.5K]
The answer is Jointly.

<span>No hardware and software cannot work without each other. 
</span>
Example:
<span>without a monitor, how can u install a software?</span>
8 0
4 years ago
Read 2 more answers
Explain the risks to privacy from collecting and storing personal data on computer systems and the programmer’s role to safeguar
Deffense [45]

Answer:

The risks is If your computer is stolen, someone  could get the data and If your laptop messes up you will you lose all the data.

Explanation:

7 0
3 years ago
The rules and guidelines for appropriate computer mediated communication are called ________. A. Social norms b. Etiquette c. Ne
horsena [70]

The rules and guidelines for appropriate computer mediated communication are called Netiquette.

<h3>What is Netiquette?</h3>

Netiquette, which is a  blend of  “net” and “etiquette,” refers to the polite  and appropriate behavior  when communicating with others online.

These rules are important as they help to improve  communication skills, prevent misconceptions, and encourage only socially acceptable behavior when working or  collaborating online.

Some of the DOs of Netiquette among others includes:

  • Being mindful of your tone
  • Use of  emoticons
  • Use of good grammar

Some of the DONTs among others includes:

  • Overuse of abbreviations
  • Unnecessary rants/Flaming
  • Overusing  caps

In conclusion Netiquette involves not doing what you would not do in person.

Learn more about Netiquette here:brainly.com/question/998689

3 0
2 years ago
Do yall play games..............................................................................................................
polet [3.4K]

Answer:

hell yeah boi. ...................................

7 0
3 years ago
Read 2 more answers
Other questions:
  • A web __________, such as internet explorer or mozillaâs firefox, allow users to access the world wide web.
    10·1 answer
  • What does "FDDI" stand for in Technology?
    5·2 answers
  • Which of these is a cultural form? A. Art B. Food C. Clothes D. All of the above
    8·2 answers
  • Each vertex in a graph of n bertices can be the origin of at most ____edges
    11·1 answer
  • Which of the following is best practice to minimize the chance of infecting your mobile device with malware
    10·1 answer
  • Working together, printer A and printer B would finish the task in 24 minutes. Printer A alone would finish the task in 60 minut
    8·1 answer
  • Universal Container sales reps can modify fields on an opportunity until it is closed. Only the sales operations team can modify
    13·1 answer
  • Which of the following statements is not correct ​
    6·2 answers
  • Malcolm Movers charges a base rate of $200 per move plus $150 per hour and $2 per mile. Write a program named MoveEstimator that
    5·1 answer
  • Fill in the blanks Pasaline could ----- and ------- very easily.​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!