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
The gap in ease of access to technology is known as the ________ divide. Select one: A. technology B. Internet C. web D. digital
strojnjashka [21]

Answer:

D

Explanation:

Digital Divide

3 0
4 years ago
Read 2 more answers
True or false
ICE Princess25 [194]
1. True
2. Usually true, but it depends on the search engine you're using.  For example, Google lets you search for several words without commas.
3 0
3 years ago
I need help figuring out 2 pictures with topics that I can put on a magazine about the serengeti. This is something I'm doing fo
Usimov [2.4K]

Answer:

how about lions, trees, or zebras

Explanation:

i looked it up

4 0
3 years ago
Read 2 more answers
When you merge business letters, how many total documents will you have when you are finished with the merge process?
pychu [463]

Answer:

D. unable to determine – you will have one letter for each recipient on the list.

Explanation:

The reason because of this it depends on how many recipients there are to begin with.

Hope This Helps ;)

8 0
3 years ago
Read 2 more answers
The ____ contains buttons that provide different views of the document window, and some common operations related to viewing and
alexandr402 [8]
I think it is called a document tool bar
8 0
3 years ago
Other questions:
  • When you develop an application using a 3-layer architecture, the layer that provides the user interface is called the _____ lay
    13·1 answer
  • Identifying the problem is crucial when trying to solve a problem. There are several techniques that you can use to aide you in
    5·1 answer
  • Seasons Write a program that takes a date as input and outputs the date's season. The input is a string to represent the month a
    14·1 answer
  • Ideally, how often should you back up the data on your computer? once an hour, once a day, once a month, once a year. Please hur
    5·2 answers
  • Professional photography is a competitive job field. <br> true <br> false
    12·2 answers
  • How does white balancing affect the images recorded by a camera?
    15·1 answer
  • What is the world first mobile phone brand​
    5·2 answers
  • The data model shows the_______structrue of database.​
    14·1 answer
  • Bộ mã I mã hóa được nhiêu kí tự
    12·1 answer
  • What is the difference between windows 10 and windows 11
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!