Need equation form for this number problem.

Theater tickets are $8 for general admission and $5 for students. During one evening 240 tickets were sold, and the receipts were $1680. How many of each type of ticket was sold?

use the equations and solve
g -----> number of general admisson tickets
s ---- > number of student tickets

8g + 5s = 1680

g + s = 240

To solve this problem, we need to set up a system of equations using the given information.

Let's assign variables to represent the unknowns:
Let g be the number of general admission tickets.
Let s be the number of student tickets.

Based on the given information, we can set up the following equations:

Equation 1: The total revenue from general admission tickets and student tickets is $1680. Since general admission tickets cost $8 and student tickets cost $5, the equation becomes:
8g + 5s = 1680.

Equation 2: The total number of tickets sold, both general admission and student tickets, is 240. So the equation becomes:
g + s = 240.

Now, we have a system of equations:
8g + 5s = 1680,
g + s = 240.

To solve this system of equations, we can use the method of substitution or elimination.

Let's use the elimination method:

Multiply Equation 2 by 8 to make the coefficients of g the same in both equations:
8(g + s) = 8(240),
8g + 8s = 1920.

Now, we can subtract Equation 2 from the multiplied Equation 2 to eliminate g:
8g + 5s - (8g + 8s) = 1680 - 1920,
8g + 5s - 8g - 8s = -240,
-3s = -240,
s = -240 / -3,
s = 80.

Substitute s = 80 into Equation 2:
g + 80 = 240,
g = 240 - 80,
g = 160.

Therefore, 160 general admission tickets and 80 student tickets were sold.