MHB How can I get equal columns and rows from a total?

  • Thread starter Thread starter SLSCoder
  • Start date Start date
  • Tags Tags
    Columns
AI Thread Summary
To determine the number of equal columns and rows from a variable total of cells, the calculation involves using the floor function on the square root of the variable x. For example, if x equals 10, the result is 3 columns and 4 rows, with the last row containing only one value. The formula effectively helps in organizing the cells into a grid format. This method ensures that the layout remains balanced while accommodating the total number of cells. Understanding this calculation is essential for efficient data presentation.
SLSCoder
Messages
4
Reaction score
0
I have a number of cells (say 10 cells) but that number is a variable.
I have the value of the variable but it's not a 'hard' number. We'll call the variable x.

I need to calculate how many columns I'll have if the columns and rows will be the same, or the columns will be 1 minus (floor) the number of rows.
If the variable x = 10 then the columns would be 3 and there would be 4 rows, the last row would only have a value in the first column.

How can I calculate for the number of columns I need given the variable x?
 
Mathematics news on Phys.org
Duh - floor(square root of x)
 
Thread 'Video on imaginary numbers and some queries'
Hi, I was watching the following video. I found some points confusing. Could you please help me to understand the gaps? Thanks, in advance! Question 1: Around 4:22, the video says the following. So for those mathematicians, negative numbers didn't exist. You could subtract, that is find the difference between two positive quantities, but you couldn't have a negative answer or negative coefficients. Mathematicians were so averse to negative numbers that there was no single quadratic...
Thread 'Unit Circle Double Angle Derivations'
Here I made a terrible mistake of assuming this to be an equilateral triangle and set 2sinx=1 => x=pi/6. Although this did derive the double angle formulas it also led into a terrible mess trying to find all the combinations of sides. I must have been tired and just assumed 6x=180 and 2sinx=1. By that time, I was so mindset that I nearly scolded a person for even saying 90-x. I wonder if this is a case of biased observation that seeks to dis credit me like Jesus of Nazareth since in reality...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Back
Top