-
If you want the formula,
How many squares are there in a rectangle with a square and a square? (A & gtb)
There is an A*B square with a side length of 1.
There are (A- 1)*(B- 1) squares with two sides.
There are (A-2)*(B-2) squares with three sides.
...
There are (A-(B- 1))* 1 squares with side length b.
* * * There is a * b+(a-1) * (b-1)+(a-2) *+...+(a-(b-1)) *1square.