- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# 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.

Given:

The students of a class are made to stand in rows. If 3 student 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.

To do:

We have to find the number of students in the class.

Solution:

Let the number of rows be $x$ and the number of students in each row be $y$.

This implies,

Total number of students $=xy$ If 3 student are extra in a row, there would be 1 row less.

$\Rightarrow (x+3)(y-1)=xy$

$xy-x+3y-3=xy$

$x=3y-3$....(i) If 3 students are less in a row there would be 2 rows more.

$\Rightarrow (x-3)(y+2)=xy$

$xy+2x-3y-6=xy$

$2x=3y+6$

$2(3y-3)=3y+6$ (From (i))

$6y-6=3y+6$

$6y-3y=6+6$

$3y=12$

$y=\frac{12}{3}$

$y=4$

$\Rightarrow x=3(4)-3$ (From (i))

$x=12-3$

$x=9$

$\Rightarrow xy=9\times4=36$

Therefore, the number of students in the class is 36.

- Related Questions & Answers
- MySQL query to delete a row if two columns are equal
- Python - Check if all the values in a list are less than a given value
- What are single row and multiple row subqueries?
- MySQL limit in a range fail to display first 3 row?
- Importance of Internships to College Students
- Implement MongoDB toLowerCase() in a forEach loop to update the name of students?
- Aggregation framework to get the name of students with test one score less than the total average of all the tests
- Why should students read newspapers?
- Exam guidelines for engineering students
- How to fetch a specific row when values are the same in MySQL?
- How to create a sample from an R data frame if weights are assigned to the row values?
- Define column and row names of a square matrix in a single line code if they are same in R.
- What would be the five possessions if you are asked to keep?
- Find out the records of students with more than a specific score in MySQL?
- Effective Ways of Preparing Notes for Students
- Best way to test if a row exists in a MySQL table