The second for loop is entered rows * cols times. Each time, one addition is performed. The total number of adds is therefore, rows * cols.
for
rows * cols