Localize file www.TrSek.com/zadania/dve_cisla.pas
{ DVE_CISLA.PAS                                  Copyright (c) Pheo }
{ Program na urèenie súètu, súèinu, rozdielu, podielu dvoch daných  }
{ èísel s vo¾bou operácie.                                          }
{                                                                   }
{ Datum:14.04.2003                             http://www.trsek.com }

program dve_cisla;
var a,b:integer;
    s:real;
    operation:char;
begin
  s:=0;
  writeln('zadaj dve cisla:');
  readln(a,b);
  writeln('zvol si operaciu:+,-,*,/');
  read(operation);
  case operation of
       '+':s:=a+b;
       '-':s:=a-b;
       '*':s:=a*b;
       '/':if b<>0 then s:=a/b else write('nedefinovane v R')
  end;
  if not((operation='/') and (b=0)) then writeln('vysledok je ',s:0:2);
  writeln; readln;
end.

Copyrigth by Zdeno Sekerak 2007, http://www.trsek.com