Var z1,z2:byte; begin for z1:=1 to 9 do begin for z2:=0 to 9-z1 do begin writeln(z1,z2,z1+z2); end; end; end.
По просьбе автора задачи - вариант с 3 циклами var x,y,z:byte; begin for x:=1 to 9 do begin for y:=0 to 9 do begin for z:=0 to 9 do begin if (x+y=z) then writeln(x,y,z); end; end; end; end.