Just need help solving these word problems

Let C= no of children

A= no of adults

Then:

A+C=400 this is the statement that the sum of the people (adults and children) was 400

3*A+2*C=900 this says that each adult paid $3 and each child paid $2 for a ticket and the total amount

(the sum) spent was $900

Solving gives A=100 C=300/

Jim