Exerpad
Exercise 12 · Chapter: ArraysRequired+50 XP

Grid Coordinates

Read two numbers: rows and cols. Build a grid where each cell contains its position as r,c (row and column, starting from 0). Print each row by joining its items with spaces.

Example:

Input:

2
3

Output:

0,0 0,1 0,2
1,0 1,1 1,2
Need a hint?
3 available · costs 5 XP each
javascript

Output
Run your code to see the output here.