The students of a class are made to stand in rows. If 3 students are extra in a row, there would be 1 row less. If 3 students are less in a row, there would be 2 rows more. Find the number of students in the class.

#### Solution

Let the number of rows be *x* and number of students in a row be *y*.

Total students of the class

= Number of rows × Number of students in a row

= xy

Using the information given in the question,

**Condition 1**

Total number of students = (*x* − 1) (*y* + 3)

*xy *= (*x *− 1) (*y* + 3) = *xy *− *y* + 3*x* − 3

3*x* − *y* − 3 = 0

3*x* − *y* = 3 (*i*)

**Condition 2**

Total number of students = (*x* + 2) (*y* − 3)

*xy* = *xy* + 2*y* − 3*x* − 6

3*x* − 2*y* = −6 (*ii*)

Subtracting equation (*ii*) from (*i*),

(3*x − y*) − (3*x* − 2*y*) = 3 − (−6)

− *y* + 2*y* = 3 + 6

*y* = 9

By using equation (*i*), we obtain

3*x* − 9 = 3

3*x* = 9 + 3 = 12

*x* = 4

Number of rows = *x* = 4

Number of students in a row = *y* = 9

Number of total students in a class = *xy = 4 × 9 = 36*