subject

In a certain game, the integer variable bonus is assigned a value based on the value of the integer variable score. • If score is greater than 100, bonus is assigned a value that is 10 times score.

• If score is between 50 and 100 inclusive, bonus is assigned the value of score.

• If score is less than 50, bonus is assigned a value of 0.

Which of the following code segments assigns bonus correctly for all possible integer values of

score ?

Select two answers.

A

IF(score > 100)

{

bonus score * 10

}

ELSE

{

IF(score ≥ 50)

{

bonus score

}

ELSE

{

bonus 0

}

}

B

IF(score ≥ 50)

{

IF(score > 100)

{

bonus score * 10

}

ELSE

{

bonus 0

}

}

ELSE

{

bonus score

}

ansver
Answers: 1

Another question on Advanced Placement (AP)

question
Advanced Placement (AP), 23.06.2019 16:00
After they make styrofoam, what do they ship it in? before they invented drawing boards, what did they go back to? do infants enjoy infancy as much as adults enjoy adultery? why do irons have a setting for permanent press? how can you tell when sour cream goes bad? how much sin can i get away with and still go to heaven? how young can you die of old age? can you be arrested for selling illegal-sized paper? if all the nations in the world are in debt, where did all the money go? if work is so terrific, how come they have to pay you to do it? if the number 2 pencil is the most popular, why is it still number 2? if you ate pasta and anti-pasta, would you still be hungry? if you try to fail, and succeed, which have you done? if you steal a clean slate, does it go on your record? if you were going to shoot a mime, would you use a silencer? if you're born again, do you have two belly buttons? what if there were no hypothetical situations? where would we be without rhetorical questions? will your answer to this question be no? if man evolved from monkeys and apes, why are there still monkeys and apes? if a man is standing in the middle of the forest speaking and there is no woman around to hear him, is he still wrong? is there another word for synonym? isn't it a bit unnerving that doctors call what they do "practice? " could crop circles be the work of a cereal killer? if you choke a smurf, what color will it turn?
Answers: 1
question
Advanced Placement (AP), 25.06.2019 15:50
This is an ap world history question. i am working on a worksheet which has a vent diagram with each circle labeled either us or byzantine economy. the middle is the similarities. can someone explain to me the similarities and especially the differences between the two?
Answers: 3
question
Advanced Placement (AP), 25.06.2019 18:50
During the industrial revolution in europe, were recruited to locate criminals. sheriffs police bobbies thief catchers
Answers: 2
question
Advanced Placement (AP), 26.06.2019 08:00
The chanleys drove 112 miles ( or 7) on 4 gallons of gas. at this rate,how many mikes will they drive on 8 gallons
Answers: 1
You know the right answer?
In a certain game, the integer variable bonus is assigned a value based on the value of the integer...
Questions
question
Biology, 01.12.2020 18:20
question
Mathematics, 01.12.2020 18:20
question
Mathematics, 01.12.2020 18:20
Questions on the website: 13722363