local _N = "*n" local a, b, c, d = io.read(_N,_N,_N,_N) local temp = 0 while temp < b*d do if a <= b then if c <= d then temp = a*c print(a,c,temp) if c == d then a = a + 1 c = 1 else c = c + 1 end --print(a,c,temp) end end end