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
alina1380 [7]
3 years ago
11

What would be the value of discountRate after the following statements are executed? double discountRate = 0.0; int purchase = 1

250; if (purchase > 1000) discountRate = .05; if (purchase > 750) discountRate = .03; if (purchase < 2500) discountRate = .01; else discountRate = 0;
Computers and Technology
1 answer:
Karolina [17]3 years ago
4 0

Answer:

The value of discountRate would be 0.01

Explanation:

double discountRate = 0.0;

     int purchase = 1250;

     if (purchase > 1000)

     discountRate = .05;

     if (purchase > 750)

     discountRate = .03;

     if (purchase < 2500)

     discountRate = .01;

     else discountRate = 0;

discountRate is declared as 0.0 then purchase is 1250. But the entire if statement is sequential, that is; all the if statement are executed.

first if-statement assign .05 to discountRate because purchase is greater than 1000.

Next if-statement re-assign .03 to discountRate because purchase is greater than 750.

The last if-statement re-assign .01 to dicountRate because purchase is less than 2500. Since this is the last if statement executed, the value of discountRate is .01

You might be interested in
Automotive engine cylinder heads can be made of what?
pantera1 [17]

Answer:

automotive engine cylinder heads can be made of cast iron or aluminum

6 0
3 years ago
But this time use 16 kib pages instead of 4 kib pages. what would be some of the advantages of having a larger page size? what a
uranmaximum [27]

Here are the advantages and disadvantages of larger paper size: 

Advantages: 

Reduces minor page faults. 

Disadvantages: 

There will be a decrease in the number of frames. 

There will be an increase number of page faults. 

<span>Waste of more space with the internal fragmentation.</span>

6 0
3 years ago
How to calculate least count of a stopwatch
Nimfa-mama [501]
Look. You need to stop your watch at 00:00. And then you'll see that its least count is 0.01 second and then you should add your clocks' response time to make results more accurate.
8 0
2 years ago
For a project called "The Sheep Market", Aaron Koblin collected drawings of sheep from strangers on the Internet. He posted the
Furkat [3]

Answer:

Aaron could expect a diversity in the style of the sheep drawings.

Explanation:

Crowdsourcing is a simply a sourcing model in which an individual or organizations get goods and services, ideas and finances, from a large, relatively open and often rapidly growing group of internet users.

It makes it easier for participants to achieve a cumulative result through working differently on the same project. That is to say, it provides work between participants to achieve a cumulative result.

Its benefits is that, Crowdsourcing allows businesses to perform tasks more quickly than when a single employee is working alone. Again, Breaking up a project into a collection of smaller pieces and providing these pieces to a larger group of workers hastens the completion of projects. Overall, crowdsourcing presents a more efficient way to do work.

From the Question, Aaron was able to get different pictures of sheep in their numbers also because he used crowsourcing on amazon.

He got a variety of pictures and so many in such a short time for his project "The Sheep Market".

6 0
3 years ago
Why Embedded operating systems are also known as real-time operating systems (RTOS)?
kati45 [8]

Answer:

A real-time operating system is an operating system designed to support real-time applications that, usually without buffer delays, process data as it comes in. A real-time system is a time-bound system that has fixed, well defined time constraints.

6 0
3 years ago
Other questions:
  • Jameis is researching at his local library when he finds a perfect source to use in his paper. When he goes to check the book ou
    12·2 answers
  • If you define CSS rules on a parent control, the rules will be inherited by all of the children widgets.
    12·1 answer
  • 1. Zack sees an online contest. He could win $10,000 instantly! On the sign-up form, he enters his name and email address. He is
    15·1 answer
  • What was the major sign that lead Professor Shiller to predict the crash of the housing market​
    6·1 answer
  • Impanation stage contain ​
    10·1 answer
  • Kara has been asked to create an employment application form for her company. Which of the following items can she use to make s
    10·1 answer
  • Looking for friends, anyone up for it?
    12·2 answers
  • Where is 5G being used and how fast is it?​
    5·2 answers
  • HELP!!!
    15·2 answers
  • Your program will be used by many departments at the university. Your comments will be important to their IT people. What would
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!