Computers and Technology

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
}

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 19:20, mayaparness
Write a program that prompts the user to input a string. the program then uses the function substr to remove all the vowels from the string. for example, if str = "there", then after removing all the vowels, str = "thr". after removing all the vowels, output the string. your program must contain a function to remove all the vowels and a function to determine whether a character is a vowel.
Answers: 2
image
Computers and Technology, 23.06.2019 11:00, la200564
How should you specify box sizes on a web page if you want the boxes to vary according to the font size of the text they contain? a. in pixels b. in inches c. as percentages d. in em units
Answers: 2
image
Computers and Technology, 23.06.2019 19:30, Felixthecat7186
Anul 2017 tocmai s-a încheiat, suntem trişti deoarece era număr prim, însă avem şi o veste bună, anul 2018 este produs de două numere prime, 2 şi 1009. dorel, un adevărat colecţionar de numere prime, şi-a pus întrebarea: “câte numere dintr-un interval [a, b] se pot scrie ca produs de două numere prime? “.
Answers: 3
image
Computers and Technology, 23.06.2019 20:30, summerhumphries3
What are some settings you can control when formatting columns?
Answers: 1
Do you know the correct answer?
In a certain game, the integer variable bonus is assigned a value based on the value of the integer...

Questions in other subjects:

Konu
Biology, 03.03.2020 03:32