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
Where do you place the title tag in HTML​
makkiz [27]

Answer:

The title tag is basically your saved document

Save as and poof

High Hopes^^

Barry-

5 0
3 years ago
Which of the following is generally true about Open Source Software?
JulijaS [17]
<span>Open source software is usually free to download and install, and it can be studied, changed, and distributed according to the rights of the software. I don't believe there is any copyright laws on this type of software. The most known open source software is Linux and it's available for most operating systems right now. Typically, open source owners just ask for donations for their work.</span>
3 0
3 years ago
which of these is another name for a pre- written formula a.reference b. function c. value d. selection​
sineoko [7]

Answer:

the answer is b. function

6 0
3 years ago
With which game is shigeru miyamoto associated
Juliette [100K]

Answer: Mario, Donkey Kong, and Legend of Zelda.

To be honest those are not the only games that Shigeru Miyamoto is associated with, but these are the games that he is most known for. Shigeru Miyamoto is a video game designer and producer who works for the Nintendo company.

These games mentioned are just some of the games that he helped produce for the company. He started working for the Nintendo company on 1977 and helped with the production of multiple games after joining the company. He initially started working in the Nintendo company as a manga artist, but then moved on to help design and produce different video games.

4 0
3 years ago
What is output by the following program?
zubka84 [21]

The output of the program is 10.

def mult(a, b = 1, c = 1):

    print(a * b * c)

mult(2, 5)

<h3>Code explanation:</h3>

The code is written in python.

  • A function is declared named "multi" and the function has parameter of a, b and c. The default value of b and c are 1.
  • Locally, we print the product of a, b and c.
  • Finally, we call the function with its inputted parameters. Notice we only had 2 argument while calling the function. This simply implies that the default value for c is used. Therefore,  we will have 2 × 5 × 1 = 10

learn more on python here: brainly.com/question/22796383

8 0
2 years ago
Other questions:
  • I need help making a survey for highschool students in my school any topics/questions?
    9·1 answer
  • A(n ____ is a named group of formatting characteristics.
    7·1 answer
  • Sorry to bother you guys but for some reason it wont let me comment. How can i fix this?
    5·2 answers
  • PLZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    11·2 answers
  • Java-Script Concept quiz:
    6·1 answer
  • Which of the following sets of data would be presented best in a histogram.
    12·1 answer
  • How many strings with five or more characters can be formed from the letters in seeress?
    15·1 answer
  • Input 3 positive integers from the terminal, determine if tlrey are valid sides of a triangle. If the sides do form a valid tria
    6·1 answer
  • How is it possible for the router to know whether it is supposed to send a cat photo to your laptop
    5·1 answer
  • An operating system with _____ capabilities allows a user to run more than one program concurrently.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!