116k views
5 votes
The variable 'a' starts with the value 1 The variable 'b' starts with the value 10 The variable 'c' starts with the value 100 The variable 'x' starts with the value 0 Store the value of 'c' times 3 in 'x' Add the value of 'b' times 6 to the value already in 'x' Add the value of 'a' time 5 to the value already in 'x' Display the value of 'x' on the screen.

a. 355
b. 365
c. 325
d. 370

1 Answer

3 votes

Answer:

The answer is B = 365

Step-by-step explanation:

The following variable were initialized:

a = 1

b = 10

c = 100

x = 0

Then we store the value of 'c' times 3 in 'x'

x = 3 * c = 3 * 100 = 300

x = 300

Then we add the value of 'b' times 6 to the value already in 'x'

x = x + 'b' times 6

x = x + (b * 6) = 300 + (10 * 6) = 300 + 60 = 360

x = 360

Then we add the value of 'a' times 5 to the value already in 'x'

x = x + 'a' times 5

x = x + (a * 5) = 360 + (1 * 5) = 360 + 5 = 365

x = 365.

Therefore, the value of 'x' displayed is 365.

User Lekesha
by
7.9k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.