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
You cannot be everywhere at once, but your freedom allows you to
Kay [80]
This type of freedom is called dreaming
7 0
3 years ago
Which of the following types of software applications would open a file
Mumz [18]
It’s C. An MP3 file is an audio/video file, so only a media player would be able to play this
8 0
4 years ago
In 2-5 paragraphs, describe the points that Kendra needs to consider when choosing a telecommunications technology to meet her n
never [62]

Answer:

For marketing requirements, various communication mediums like digital communication medium, as well as non digital traditional communication medium can be used. Some like Blogs, Article directories, forums etc. can be used.

However, the AI, ML, DL and the traditional statistical analysis from Data Science can also be used. You need to install on your blog the chat-bots, And through the Chat-bots we can make a data set, that is in fact automatically generated, and contains email, phone numbers, addresses etc, and this data base can be used to run the Amazon Sage-makers. and a lot of meaningful information can be achieved through the prepared data-set through the Sage-maker.

Thus, you can find out quite easily what is good.

Sage maker, Chat bots and Blog technology is quite cost effective as well.

Explanation:

The above details covers all the requirements.

7 0
3 years ago
The arcade machine market crash in the 1980's because:
Blababa [14]

Answer:

C) A quarter was worth less than is used to be.

Explanation:

I got this answer wrong when I chose B.

7 0
3 years ago
Give two examples of html structure
butalik [34]

Answer:

semantic information that tells a browser how to display a page and mark up the content within a document

7 0
3 years ago
Other questions:
  • Easy question how the internet has impacted y’all life
    13·1 answer
  • Erick, who is taking an online course, sent an e-mail to his
    14·2 answers
  • The FaceSnap app has permission to use many devices on your smartphone, including the camera. A data privacy concern that arises
    6·1 answer
  • What are the advantages and disadvantages of malware maintenance?
    12·1 answer
  • The while loop is a pre-test loop? TRUE OR FALSE
    9·2 answers
  • Write a paper, 2-3 paragraphs that discuss how to defend ideas objectively through effective communication. Include the skills n
    6·1 answer
  • You may see the term FAQ on websites which stands for Frequently Asked Questions this is an example of which type of mnemonic?
    9·1 answer
  • All tif files start at offset 0 with what 6 hexadecimal characters?​
    11·1 answer
  • Your computer has a single hard disk w/ a single volume used by the C:\ drive. You have previously upgraded the disk to a dynami
    6·1 answer
  • I prefer a job where I am praise for good performance or I am accountable for results
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!