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
Write the use of these computers.
xxTIMURxx [149]

Answer:

i not know mainframe computer there is many use of computer

5 0
2 years ago
The information security organization performs a significant role in the implementation of solutions that mitigate risk and cont
sergiy2304 [10]

Answer:

Subject matter experts

Explanation:

Because the security organization institutes the procedures and policies to be executed, they occupy the role of Subject matter expert.

A subject matter expert is a person with a thorough and deep knowledge of a particular process, function, technology, machine, material or type of equipment. Such a person is an expert on that subject.

Therefore the information security organization occupies the role of Subject matter expert.

6 0
3 years ago
A computer is made up of hardware and software ​
denis-greek [22]
Um well yeahhhhuhh lol
4 0
3 years ago
Who was responsible for the development of the rocket motor?
kiruha [24]

Answer: Robert H. Goddard

Explanation: he developed and flew the first liquid-propellant rocket

6 0
3 years ago
Read 2 more answers
A(n) _______ is the most basic type of access query
san4es73 [151]
Select Query
I hope this helps! :)
4 0
3 years ago
Other questions:
  • Where is an ideal location to build a ground based observatory?
    10·1 answer
  • Suppose that a system uses 32-bit memory words and its memory is built from 16 1M × 16 RAM chips. How large, in words, is the me
    11·1 answer
  • If an engine has four cylinders and a total of 16 valves, how many valves would each cylinder have? A. Two B. One C. Four D. Thr
    12·1 answer
  • Science Help
    11·1 answer
  • Question #3
    12·1 answer
  • Explain the following buttons as used in emails:compose,inbox and Draft.<br>​
    10·1 answer
  • Accenture has put together a coalition of several ecosystem partners to implement the principles of blockchain and Multi-party S
    5·1 answer
  • A.Distance sensor<br> b.Programable microcontroller<br> c.Ambient light sensor<br> d.Wi-Fi
    9·2 answers
  • Have the javascript function CountingMinutes(str) take the str parameter being passed which will be two times (each properly for
    9·1 answer
  • A _____ standard describes the requirements for obtaining a domain name for use by external parties?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!