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
DENIUS [597]
3 years ago
13

Online Book Merchants offers premium customers 1 free book with every purchase of 5 or more books and offers 2 free books with e

very purchase of 8 or more books. It offers regular customers 1 free book with every purchase of 7 or more books, and offers 2 free books with every purchase of 12 or more books. Write a statement that assigns freeBooks the appropriate value based on the values of the boolean variable isPremiumCustomer and the int variable nbooksPurchased.
Business
1 answer:
EastWind [94]3 years ago
5 0

Answer:

A statement that assigns freeBooks the appropriate value based on the values of the boolean variable isPremiumCustomer and the int variable nbooksPurchased.

if(nbooksPurchased > 4){

if(isPremiumCustomer){

freeBooks = 1;

if(nbooksPurchased > 7){

freeBooks = 2;

}

}else{

freeBooks = 0;

if(nbooksPurchased > 6){

freeBooks = 1;

}

if(nbooksPurchased > 11){

freeBooks = 2;

}

}

}else{freeBooks = 0;}

Explanation:

You might be interested in
Two ways in which best bank can adapt to the challenges of the macro environment​
cupoosta [38]

Answer:

Mergers or Information Management

Explanation:

Mergers-In order to respond to certain challenges, businesses may choose to merge with another business. The new business will have a larger market share than either of the original businesses did.

Information management -All changes lead to new information that needs to be distributed to all the relevant parties.

Information must be managed efficiently and a system must be in place so that the relevant staff can easily access it.

Information must be protected and kept secure to protect the company's intellectual property.

7 0
2 years ago
Which statement best describes the role of a credit agency?
tekilochka [14]

Answer:

The statement best describes the role of a credit agency is "It tracks the use of credit for lenders"

3 0
3 years ago
______ are stocks and bonds representing secured or asset-based claims by investors against issuers.
PSYCHO15rus [73]

Answer:

1) C

2) A

Explanation:

6 0
3 years ago
Read 2 more answers
Max Maxwell's property is assessed at $412,500. He pays $5775.00 in property taxes, what is the property tax rate in his city?
UkoKoshka [18]
You divide his property by his tax. That makes 412,500 ÷ 5775 = 71.4285715286.
5775 is approx 71.4% of 412,500. The tax is approx 71.4%
To check this you multiply 71.4285714286 by 5775 which does get you 412,500
4 0
3 years ago
In 1950, the population of a small suburb in los angeles, california, was 20,000. the birth rate was measured at 25 per 1000 pop
Snowcat [4.5K]
Total Population = Current Population + (Population * Birthrate) - (Population *Deathrate) + Immigration rate - emigration rate

Total Population = 20000 + 20000(25/1000) - 20000(7/1000) + 600 - 200

Total Population = 20400 + 500 - 140

Total Population = 20760
8 0
3 years ago
Other questions:
  • A large firm in the automotive aftermarket business wants to improve its current situation, which is characterized by excess inv
    12·1 answer
  • What is the difference between direct and indirect competition?
    6·1 answer
  • Which of the following would not be an operations maangement function in a fast food restaurant?
    15·1 answer
  • What is a budget​ constraint?
    9·1 answer
  • Analyze product, price and cost in relationship in the market<br><br>​
    12·2 answers
  • Miller Company expected to incur $ 15,000 in manufacturing overhead costs and use 6,000 machine hours for the year. Actual manuf
    7·1 answer
  • Which fiscal policy would most likely result in the largest budget deficit
    13·1 answer
  • The race to the bottom scenario of global environmental degradation is explained roughly like this:
    13·2 answers
  • 10 reasons why kids should have phones Use your own words Explain your reasons
    5·2 answers
  • World Company expects to operate at 80% of its productive capacity of 50,000 units per month. At this planned level, the company
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!