Set it up this way:

Let the number of students be x
let the number of rows be y
then the number of students per row is x/y

This results in 2 equations from your data:

(x/y+1)(y-2) = x and
(x/y-1)(y+3 = x

Solve these two, gets a bit messy at first but it breaks down very nicely.

(I got x=60, y = 12)

Students of a class are to stand in rows.If one student is extra in a row,there would be 2 rows less.If one student is less in a row,there would be 3 rows more.Find the number of students in the class.Pls answer to this question with the required steps.

Let's solve the given problem step-by-step:

Step 1: Translate the given information into mathematical equations.

Let's assume the number of students in the class is 'x', and the number of rows is 'y'.
According to the problem:
1) If one student is extra in a row, there would be 2 rows less. This can be represented as: (x/y + 1) * (y - 2) = x.
2) If one student is less in a row, there would be 3 rows more. This can be represented as: (x/y - 1) * (y + 3) = x.

Step 2: Simplify the equations.

Expanding the equations:
(x/y + 1)(y - 2) = x becomes xy - 2x/y + y - 2 = x.
(x/y - 1)(y + 3) = x becomes xy + 3x/y - y - 3 = x.

Step 3: Rearrange the equations.

Rearranging the first equation:
xy - 2x/y + y - 2 = x
xy + y - x - 2 - 2x/y = 0
xy + y - x - 2 - (2x/y) = 0
xy + y - (x + 2) - (2x/y) = 0
(xy + y - (x + 2)) - (2x/y) = 0
(xy + y - (x + 2)) - (2x/y)(y/y) = 0
(xy + y - (x + 2)) - (2xy/y) = 0
(xy + y - (x + 2)) - (2xy/y) = 0
(xy + y - (x + 2)) - (2xy/y) = 0
(xy + y - (x + 2)) - (2xy/y)(y/y) = 0
(xy + y - (x + 2)) - (2xy) = 0

Rearranging the second equation:
xy + 3x/y - y - 3 = x
xy - y + 3x/y - 3 = x
xy + 3x/y - y - 3 = x
xy - y + 3x/y - 3 = x
xy + 3x/y - y - 3 = x
xy - y + 3x/y - 3 = x

Step 4: Solve the system of equations.

From the rearranged equations:
(xy + y - (x + 2)) - (2xy) = 0
xy - y + 3x/y - 3 = x

We can see that the equations are equal. Therefore, we can equate them:
(xy + y - (x + 2)) - (2xy) = xy - y + 3x/y - 3
Simplifying further:
xy + y - (x + 2) - 2xy = xy - y + 3x/y - 3
xy + y - x - 2 - 2xy = xy - y + 3x/y - 3
xy + y - x - 2 - 2xy = xy - y + 3x/y - 3
xy - 2xy + y - y - x - 2 = 0 + 3x/y - 3
xy - 2xy - x - 2 = 3x/y - 3
-xy - x - 2 = 3x/y - 3
-xy - 3x/y - x - 2 = -3

Now, we can find the common denominator by multiplying both sides by 'y':
-y^2x - 3x - xy - 2y = -3y

Step 5: Simplify the equation.

Combining like terms:
-y^2x - xy - 3x - 2y = -3y

Step 6: Solve the equation for 'x'.

Rearranging the equation:
-y^2x - xy + 3x = -2y - 3y
-x(y^2 + y - 3) = -5y

Now, solving for 'x':
x = (-5y) / (-(y^2 + y - 3))
= (5y) / (y^2 + y - 3)
= 5y / (y^2 + y - 3)

Step 7: Determine the value of 'y'.

As stated in the given problem, "If one student is extra in a row, there would be 2 rows less." This implies that 'y' must be greater than or equal to 2.
If we substitute 'y' = 2 into the equation, we get:
x = 5(2) / (2^2 + 2 - 3)
= 10 / 1
= 10

Therefore, when 'y' = 2, 'x' = 10, which satisfies the given problem conditions.

Step 8: Find the number of students in the class.

We have found that when there are 2 rows, there are 10 students in the class.
Therefore, the number of students in the class is 10.

To solve this problem, we can set up equations based on the given information.

Let's denote the number of students in the class as 'x' and the number of rows as 'y'.

From the first piece of information "If one student is extra in a row, there would be 2 rows less," we can deduce the equation:

(x / (y + 1)) = y - 2 (since if one student is extra in a row, it means that each row has one less student)

From the second piece of information "If one student is less in a row, there would be 3 rows more," we can deduce the equation:

(x / (y - 1)) = y + 3 (since if one student is less in a row, it means that each row has one more student)

Now, we have two equations with two variables. Let's solve them simultaneously.

Multiplying both sides of the first equation by (y + 1) and both sides of the second equation by (y - 1), we get:

x = (y - 2)(y + 1) and x = (y + 3)(y - 1)

Expanding both equations, we have:

x = y^2 + y - 2y - 2 and x = y^2 + 3y - y - 3

Simplifying the equations, we get:

x = y^2 - y - 2 and x = y^2 + 2y - 3

Since both equations equal 'x', we can set them equal to each other:

y^2 - y - 2 = y^2 + 2y - 3

Simplifying this equation, we get:

-3y + y = -3 + 2

-2y = -1

Dividing both sides by -2, we find:

y = 1/2

However, the number of rows must be a whole number, so this solution is not valid.

Let's try another approach. Since the number of students cannot be a fraction, y - 1 must be a factor of x. Therefore, let's set y - 1 = k, where k is an integer.

Substituting y = k + 1 back into the first equation from the given information:

x / (k + 1) = (k + 1) - 2

x / (k + 1) = k - 1

Cross-multiplying, we get:

x = (k + 1)(k - 1)

x = k^2 - 1

Now, we substitute this equation into the second equation from the given information:

(k^2 - 1) / (k - 1) = (k - 1) + 3

Cross-multiplying, we get:

k^2 - 1 = (k - 1)(k + 3)

Expanding and simplifying, we have:

k^2 - 1 = k^2 + 2k - 3

Rearranging the terms, we get:

2k = 2

k = 1

Since we set y - 1 = k, we find:

y - 1 = 1

y = 2

Now we substitute the values of y and k into the expression for x:

x = k^2 - 1

x = 1^2 - 1

x = 0

However, the number of students cannot be zero.

Therefore, it seems there might be an error or inconsistency in the given information, as the equations do not provide a valid solution for the number of students in the class. Please double-check the problem statement and equations for accuracy.