Olivia is taking a test that has 30 questions.She earns 9 points for every correct answer and loses 5 points for every wrong answer (questions left blank also count as wrong answers) . If Olivia’s score is 18 , how many questions did she answer correctly on the test .

number correct --- x

number wrong ---- 30-x

9x - 5(30-x) = 18

solve for x

So if x is 12 that means she got 12 correct and 18 wrong and that’s why the score is an 18 ?

To find out how many questions Olivia answered correctly on the test, we can set up an equation.

Let's assume Olivia answered "x" questions correctly.
Since Olivia earns 9 points for every correct answer, the total score she receives from the correct answers would be 9x.

Since questions left blank count as wrong answers, we can find the number of questions answered incorrectly by subtracting the number of correct answers from the total number of questions. Olivia answered 30 - x questions incorrectly.
Since Olivia loses 5 points for every wrong answer, the total score she loses from the incorrect answers would be 5(30 - x).

Given that Olivia's total score is 18, we can set up the equation:
9x - 5(30 - x) = 18.

Let's solve this equation:

9x - 150 + 5x = 18
14x - 150 = 18
14x = 168
x = 168/14
x = 12

Therefore, Olivia answered 12 questions correctly on the test.