A student sold candy bars and bags of popcorn for a school fund-raiser.

- The student sold a total of 240 candy bars and bags of popcorn.

- The price of each candy bar was $1, and the price of each bag of popcorn was $2.

- The student sold $300 worth of candy bars and bags of popcorn.

How many candy bars did this student sell for the school fund-raiser?

A.) 80

B.) 60

C.) 180

D.) 120

Let's solve this problem using algebra.

Let X be the number of candy bars sold.
Then the number of bags of popcorn sold is 240 - X.

The total amount earned from candy bars is X * $1.
The total amount earned from bags of popcorn is (240 - X) * $2.

Since the total amount earned is $300, we can write the equation:
X * $1 + (240 - X) * $2 = $300.

Simplifying the equation:
X + (480 - 2X) = 300.
Combining like terms:
- X + 480 = 300.
Subtracting 480 from both sides:
- X = -180.
Dividing by -1 to solve for X:
X = 180.

Therefore, the student sold 180 candy bars for the school fund-raiser.

The answer is C.) 180.