please help me write a complete algebraic solution thanks

problem 18. mike, alex, olivia ran for the office of president of their senior class . of the 400 votes cast, olivia received 38% of the votes and michael received 116 votes.
A. What % of the votes did michael receive?
B. How many votes did Alex receive for senior class president in problem 18?
C.who was elected class president? By how many votes did the second-place candidate lose?

38% of 400 is 152 for O.

They tell you that there are 116 for M.

A. Convert 116/400 to %
B. 400 -152 -116 = 132 for A
C. Compare O, M and A.
O - A = ?

To solve this problem algebraically, we can use the given information and set up equations to find the solutions.

Let's define the following variables:
- M: the number of votes Michael received
- A: the number of votes Alex received
- O: the number of votes Olivia received

Given information:
- Olivia received 38% of the votes: O = 0.38 * 400
- Michael received 116 votes: M = 116
- The total number of votes is 400: M + A + O = 400

We can now solve the equations step by step:

A. What % of the votes did Michael receive?
To find the percentage of the votes Michael received, we need to calculate M as a percentage of the total number of votes (M + A + O).
M as a percentage = (M / (M + A + O)) * 100

Substituting the given values:
M as a percentage = (116 / (116 + A + 0.38 * 400)) * 100

B. How many votes did Alex receive for senior class president?
Since we know the total number of votes and the votes received by Olivia and Michael, we can calculate Alex's votes by subtracting Olivia's votes (O) and Michael's votes (M) from the total.
A = 400 - O - M

C. Who was elected class president? By how many votes did the second-place candidate lose?
To determine the elected class president, we need to compare the number of votes received by each candidate (M, A, O).
- If M > A and M > O, then Michael is elected president.
- If A > M and A > O, then Alex is elected president.
- If O > M and O > A, then Olivia is elected president.

To find the number of votes by which the second-place candidate lost, we need to calculate the difference between the votes received by the elected president and the second-place candidate. For example, if Michael is elected and Olivia is the second-place candidate, the difference will be O - M.

By substituting the given values, we can calculate the actual values for each part of the problem.

To solve this problem algebraically, we'll start by defining variables for the unknowns mentioned in the problem.

Let's assume:
- The percentage of votes Michael received is P.
- The number of votes Alex received is A.

Now, let's provide the necessary information and equations to solve the problem.

1. Olivia received 38% of the votes:
This means the remaining votes, 100% - 38% = 62%, were divided between Michael and Alex.

2. Michael received 116 votes:
This gives us the equation:
P% of 400 = 116

3. Alex received the remaining votes:
This gives us the equation:
(100% - 38%)% of 400 = A

Now, let's solve each part of the problem algebraically.

A. What % of the votes did Michael receive?
To find the percentage of votes Michael received, we can use the equation from point 2:
P% of 400 = 116

To solve for P, divide both sides of the equation by 400:
P = 116/400

Now, calculate P:
P ≈ 0.29

Therefore, Michael received approximately 29% of the votes.

B. How many votes did Alex receive?
To find the number of votes Alex received, we can use the equation from point 3:
(100% - 38%)% of 400 = A

To simplify, calculate the percentage remaining after Olivia's votes:
(100% - 38%) = 62%

Now, substitute this value into the equation and solve for A:
62% of 400 = A

To calculate A, multiply 62% by 400:
A = 0.62 * 400

Therefore, Alex received 248 votes.

C. Who was elected class president? By how many votes did the second-place candidate lose?
Olivia received 38% of the votes, Michael received 29% of the votes, and Alex received 248 votes.

Comparing Olivia's votes with the total votes makes her the candidate who received the highest percentage of votes. Therefore, Olivia was elected class president.

To find how many votes the second-place candidate (Michael) lost by, subtract Michael's votes from Olivia's votes:
Olivia's votes - Michael's votes = 38% of 400 - 116

Calculating this, we get:
0.38 * 400 - 116

Therefore, the second-place candidate (Michael) lost by approximately 2 votes.

Hence, Olivia was elected class president with a margin of approximately 2 votes over Michael.