Displays the diagram of the calculations
Delphi & Pascal (česká wiki)
Category: Homework in Pascal
Program: Tabulka.pas
File exe: Tabulka.exe
Program: Tabulka.pas
File exe: Tabulka.exe
Displays the diagram of the calculations
{ TABULKA.PAS Copyright (c) TrSek alias Zdeno Sekerak } { Zobrazi tabulku vypoctov a+b, a-b, a*b, a/b } { Vstup : polia cisel a,b } { Vystup: tabulka vypoctov pre polia a,b } { } { Datum:10.04.2000 http://www.trsek.com } program tabulka (input, output); var n,i : integer; a,b : array[1..10] of integer; begin writeln ('Zadaj rozmer pola: '); read (n); if (n > 10) then writeln ('Nekorektny rozmer !') else begin for i:= 1 to n do begin writeln ('Zadaj prvok ',i,' vektorov A,B: '); read (a[i], b[i]); end; writeln (' A B | A+B A-B A*B A/B'); for i:= 1 to n do writeln (' ',a[i],' ' ,b[i],' | ',a[i]+b[i],' ',a[i]-b[i],' ',a[i]*b[i],' ',a[i]/b[i]:2:1); end; readln; end.