Wyrownanie odstepow w tabeli

0
var i: integer;
a, b: boolean;
begin
a := true;
b := true;
writeln('  a   |  b   |  not a | a and b | a or b | a xor b');
writeln('------|------|--------|---------|--------|---------');
for i := 1 to 4 do begin
        if i = 2 then b := not b;
        if i = 3 then a := not a;
        if i = 4 then b := not b;
        writeln(a, ' |  ',
                b, ' |  ',
                not a, ' |  ',
                a and b, ' |  ',
                a or b, ' |  ',
                a xor b);
       end;
       readln;
       end.
 

Witam, mam problem, ktory jest zwiazny z tym ze nie potrafię wyników boolowskich wyrównać w Tabelce. Czy moglby mi to ktos poprawić i opisać, bym wiedział na przyszłość?
Pozdrawiam

0

pomijając fakt, że cała ta pętla jest lekko bez sensu to formatuje się tak

var i: integer;
a, b: boolean;
begin
a := true;
b := true;
writeln('    a    |    b    |  not a  | a and b | a or b  | a xor b');
writeln('---------|---------|---------|---------|---------|---------');
for i := 1 to 4 do begin
        if i = 2 then b := not b;
        if i = 3 then a := not a;
        if i = 4 then b := not b;
        writeln(a:8, ' |',
                b:8, ' |',
                not a:8, ' |',
                a and b:8, ' |',
                a or b:8, ' |',
                a xor b:8);
       end;
       readln;
       end.
0

Dziękuję za Pomoc, teraz juz wiem gdzie byl kruczek.

1 użytkowników online, w tym zalogowanych: 0, gości: 1