{ 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.