Ja nu kādam noder, skolai vajag, vai kautkādā tādā gadijumā. ;)

 

PROGRAM CALC;
USES CRT;
VAR Sk_1 : Int64;
VAR Sk_2 : Int64;
VAR Darb : string;
VAR Loop : boolean;
VAR Turpin : string;
BEGIN
Loop := true;
while loop = true do
begin;
ClrScr;
WriteLn('########## Calculator by SJ ##########');
WriteLn('Pirmais skaitlis:');
ReadLn(Sk_1);
WriteLn('Darbiiba (+, -, *, /)');
ReadLn(Darb);
WriteLn('Otrais skaitlis:');
ReadLn(Sk_2);
if darb = '+' then WriteLn(Sk_1,' ', darb,' ', Sk_2, ' = ', Sk_1+Sk_2);
if darb = '-' then WriteLn(Sk_1,' ', darb,' ', Sk_2, ' = ', Sk_1-Sk_2);
if darb = '*' then WriteLn(Sk_1,' ', darb,' ', Sk_2, ' = ', Sk_1*Sk_2);
if darb = '/' then WriteLn(Sk_1,' ', darb,' ', Sk_2, ' = ', Sk_1/Sk_2);
WriteLn('Velreiz? [Y/N]');
ReadLn(Turpin);
if Turpin = 'N' then Loop := false;
end;
END.