Answer:
There are 18 students in the class.
Explanation:
Let's say there are
students in the class.
Then, one student will send
valentines.
Therefore,
Total number of valentines sent = Number of valentines sent by 1 student*Total number of students in the class.
⇒

=

=

=

=

=

Therefore either,
or

or

But the number of students cannot be a negative value, So we choose
Therefore there are 18 students in the class.