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
algol [13]
3 years ago
5

A shop will give discount of 10% if the cost of purchased quantity is more than 1000. Ask user for quantity suppose, one unit wi

ll cost 100. Judge and print total cost for user. Plz give answer in C++.
Computers and Technology
1 answer:
Mamont248 [21]3 years ago
4 0

Answer:

The program in C++ is as follows:

#include <iostream>

using namespace std;

int main(){

   int qty;

   float discount = 0;

   cout<<"Quantity: ";

   cin>>qty;

   int cost = qty * 100;

i f (cost > 1000) {        discount=cost * 0.10;        }

   cout<<"Cost: "<<cost - discount;

   return 0;

}

Explanation:

This declares the quantity as integer

   int qty;

This declares and initializes discount to 0

   float discount = 0;

This prompts the user for quantity

   cout<<"Quantity: ";

This gets input for quantity

   cin>>qty;

This calculates the cost

   int cost = qty * 100;

If cost is above 1000, a discount of 10% is calculated

i f (cost > 1000) {        discount=cost * 0.10;        }

This prints the cost

   cout<<"Cost: "<<cost - discount;

You might be interested in
WILL UPVOTE ALL
Scrat [10]
Ash is the answer. Hope this helps
6 0
3 years ago
Which very high-speed fiber network was already in place and being used for wide area networking (wan) transmissions, before the
Stolb23 [73]

The high-speed fiber network that is already in place and being used for wide area networking (wan) transmissions, before the IEEE developed the 10gbe ethernet standards is called SONET.

<h3>What does SONET stand for in networking?</h3>

SONET  is known to be a term that is called Synchronous Optical Network.

This is said to be defined as a standard  that is known to be used in linking or in the act of connecting fiber-optic transmission systems and it is one that is sold in North America only.

Therefore, The high-speed fiber network that is already in place and being used for wide area networking (wan) transmissions, before the IEEE developed the 10gbe ethernet standards is called SONET.

Learn more about fiber network from

brainly.com/question/26259562
#SPJ1

8 0
1 year ago
If you were optimizing for performance and wanted to support potentially adding many new elements to an adt, then:
muminat

<span>If you were optimizing for performance and wanted to support potentially adding many new elements to an adt, then a list would allow faster addition of elements than an array. The object that contains the data of similar type is called an array. When the array is created, its length of array is established.</span>

7 0
3 years ago
The accounting department moved its network-attached printer from one side of the office to a more centralized location, making
Blababa [14]

Answer:

The cable run connecting the new keystone jack to the patch panel is bad.

The patch panel connector for the new location's cable run is not connected to a switch.

Explanation:

The cable run connecting the new keystone jack to the patch panel is bad.

The patch panel connector for the new location's cable run is not connected to a switch.

5 0
3 years ago
Can someone write a 5 sentence summary about Virtual Assistants. Please. I'm in a rush. Personal problems.
Lyrx [107]
Virtual Assistants can be useful. Blind people can use them to be informed, browse the web, and learn new facts. They can make tasks quicker too. They can control things like your heater or air conditioner. But if one were to malfunction, it could take lives.
7 0
3 years ago
Other questions:
  • Write code statements to create a DecimalFormat object that will round a formatted value to four decimal places. Then write a st
    15·1 answer
  • What are some programs that you have used that have condition-controlled loops and count-controlled loops?
    10·1 answer
  • The countryside presents
    11·1 answer
  • Which of the following is true about scalability?
    9·1 answer
  • Which of the following is not a key way that a LAN shares
    15·1 answer
  • Use the Windows ________ to check on a nonresponsive program. Select one: A. Backup utility B. Task Manager C. System Restore D.
    10·1 answer
  • What do u mean by generation of computer
    10·1 answer
  • With SQL, how do you select all the columns from a table named "Persons"?
    8·1 answer
  • Rita tried unsuccessfully to open a PDF file attachment in her Inbox by double-clicking the attachment in the Reading Pane. What
    8·1 answer
  • Why would over-50 executives have a harder time buying into the idea of social media?​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!