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
andrezito [222]
3 years ago
7

Consider the following If statement, which is syntactically correct but uses poor style and indentation: if (x >= y) if (y &g

t; 0) x = x * y; else if (y < 4) x = x - y; Assume that x and y are int variables containing the values 9 and 3, respectively, before execution of the above statement. After execution of the statement, what value will x contain?
Mathematics
1 answer:
Natali [406]3 years ago
3 0

Answer:

27

Step-by-step explanation:

       int x = 9;

       int y = 3;

       if (x >= y)

       if (y > 0)

       x = x * y;

       else if (y < 4)

       x = x - y;

First, the first if statement check for the value of x>=y which is true. The another if-statement check if y>0, which is true and it execute the statement x = x * y that is x = 9 * 3 and x = 27.

The else-if block is not executed because the if-statement attached to it has been executed already.

You might be interested in
PLEASE HELP QUICKLY<br> What is the value of y
zepelin [54]

Answer:

y = 8 degrees

Step-by-step explanation:

128 + 7y - 4 = 180

7y - 4 = 52

7y + 56

y = 8

7 0
3 years ago
The cylinder and the sphere below have the same radius and the same volume. What is the height of the cylinder?
lyudmila [28]

Answer:

Height of cylinder (h) = (4/3)R

Step-by-step explanation:

Given:

Radius of cylinder (r1) = R

Height of cylinder (h) = H

Radius of sphere (r2) = R

Volume of cylinder = volume of sphere

Find:

Height of cylinder (h) = H = ?

Computation:

Volume\ of\ cylinder = volume\ of\ sphere\\\\ \pi (r1)^2h =\frac{4}{3} \pi (r2)^3\\\\\pi (R)^2h =\frac{4}{3} \pi (R)^3\\\\ h=\frac{4}{3}  (R)

Height of cylinder (h) = (4/3)R

4 0
3 years ago
2.
iren [92.7K]

Answer:

  • Part A: The price of fuel A is decreasing by 12% per month.

  • Part B: Fuel A recorded a greater percentage change in price over the previous month.

Explanation:

<u>Part A:</u>

The function     f(x)=2.27(0.88)^x     calculates the price of fuel A each month by multiplying the price of the month before by 0.88.

Month       price, f(x)

1                 2.27 (0.88) = 1.9976 ≈ 2.00

2                2.27(0.88)² = 1.59808 ≈ 1.60

3                2.27(0.88)³ = 1.46063 ≈ 1.46

Then, the price of fuel A is decreasing.

The percentage per month is (1 - 0.88) × 100 = 12%, i.e. the price decreasing by 12% per month.

<u>Part B.</u>

<u>Table:</u>

m       price, g(m)

1          3.44

2         3.30

3          3.17

4         3.04

To find if the function decreases with a constant ration divide each pair con consecutive prices:

  • ratio = 3.30 / 3. 44 = 0.959 ≈ 0.96
  • ratio = 3.17 / 3.30 = 0.960 ≈ 0.96
  • ratio = 3.04 / 3.17 = 0.959 ≈ 0.96

Thus, the price of fuel B is decreasing by (1 - 0.96) × 100 =4%.

Hence, the fuel A recorded a greater percentage change in price over the previous month.

5 0
4 years ago
David is buying a cheese wheel priced at $650before tax. The store charges 8% sales tax.
Hitman42 [59]

Answer:

total price is $702

Step-by-step explanation:

650 x 0.08 = $52 tax amount

650 + 52 = $702

6 0
3 years ago
5,049 +48=105
Alborosie
<h2>Solution (a) :-</h2>

Let the cost of the less expensive comic book be x .

Then :-

1284 - 11x = x

Using this equation , we can find the cost of the less expensive comic book .

Price of the less expensive book :-

1284 - 11x = x

11x + x = 1284

12x = 1284

x =  \frac{1284}{12}

x = 107

Cost of the less expensive book is 107 .

Therefore , the epice of the less expensive book = $ 107 .

<h2>Solution (b) :-</h2>

Cost of the more expensive book = 11x

Which means :-

1284 - x = 11x

11x + x = 1284

12x = 1284

x = 107

11x = 11 \times 107

= 1177

Therefore , the price of the more expensive book = $ 1177 .

4 0
3 years ago
Other questions:
  • Whoever answers this question correctly will get the brainliest. what is 5x+9 if x=12
    12·2 answers
  • Which of these represents six miles less than twice the original distance?
    7·2 answers
  • Calculus help ASAP!!!
    7·1 answer
  • Ehhh... idk okay?? Help me
    7·1 answer
  • Which expressions are equivalent to <br> −f−5(2f-3)<br> Choose all answers that apply
    11·1 answer
  • after selling three fifth of its books, a bookstore had 880 textbooks left. how many books were in the bookstore initially
    9·1 answer
  • What is the result when 8x^3+16x2+24x+27/2x+3
    9·1 answer
  • Vhich inequality represents the gjven situation. There are at least 12 people at the birthday party.What’s the function?
    9·1 answer
  • Exactly 9 years ago, Jeri opened a bank account that earned 2% interest each year. If the account now has $215.12, how much did
    11·1 answer
  • I am the 2nd digit number with two prime factors each to the second power. what number am i?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!