print out multiplication table using a single loop