Advertisement
rayhanf

nested-loop

Mar 10th, 2023
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.25 KB | Source Code | 0 0
  1. var
  2.     i: shortint;
  3.     x: char;
  4.  
  5. begin
  6.     clrscr;
  7.     for i:=1 to 3 do // untuk barisnya
  8.     begin
  9.         for x:='A' to 'D' do // untuk kolomnya
  10.             write(i, x, ' '); // utk mencetak baris+kolom dan spasi antar kolom
  11.         writeln; // untuk melakukan enter
  12.     end;
  13. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement