This is an arithmetic sequence with a(0) (the first term) of 1, and a difference of 2.
In such a sequence the nth term (for this problem it's the number of rows) a(n) = a(0) + (n-1)d where d is the difference (2).
The 10th term, for example, is 1+9*2 = 19.
The sum of the first n terms S(n) = n*(a(0)+a(n))/2
Try that 10th term to see if the sum (the number of cans) is 100, or more than 100 (then try a smaller n) or less than 100 (then try a bigger n).
S(10) = 10*(1+19)/2 = 200/2 = 100.
When there are 10 rows there are 100 cans.
Hope the solution helped. Sometimes you need more than a solution. Contact fcabanski@hotmail.com for online, private tutoring, or personalized problem solving (quick for groups of problems.)