Write and solve an algebraic equation to find the answer.

From midnight to 6:00 am, the temperature rose 8°C. At 6:00 am, the temperature was
−20°C. What was the temperature at midnight?

−20°C - 8°C = x

x = −28°C

Let's assume the temperature at midnight as "x" degree Celsius.

From midnight to 6:00 am, the temperature rose 8°C. Therefore, the temperature at 6:00 am will be x + 8°C.

Given that the temperature at 6:00 am was -20°C, we can set up the equation:

x + 8 = -20

To solve for x, we can subtract 8 from both sides of the equation:

x = -20 - 8

Simplifying this equation gives us:

x = -28

Therefore, the temperature at midnight was -28°C.