GamerSK

Kalkulacka

Dec 14th, 2016
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.75 KB | None | 0 0
  1. program kalkulacka;
  2. {$APPTYPE CONSOLE}
  3. uses SysUtils;
  4. var o:char;
  5.     c1,c2 : integer;
  6. begin
  7.   { TODO -oUser -cConsole Main : Insert code here }
  8. write('Zadajte prve cislo: ');
  9. readln(c1);
  10. write('Zadajte druhe cislo: ');
  11. readln(c2);
  12. write('Vyberte si operaciu: ');
  13. readln(o);
  14.   case o of
  15.     '+':begin
  16.         writeln('Zvolili ste si sucet!');
  17.         write(c1,'+',c2,'=',c1+c2);
  18.         end;
  19.     '-':begin
  20.         writeln('Zvolili ste si podiel!');
  21.         write(c1,'-',c2,'=',c1-c2);
  22.         end;
  23.     '*':begin
  24.         writeln('Zvolili ste si sucin!');
  25.         write(c1,'*',c2,'=',c1*c2);
  26.         end;
  27.     '/':begin
  28.         writeln('Zvolili ste si rozdiel!');
  29.         write(c1,'/',c2,'=',c1/c2:1:3);
  30.         end;
  31.   end;
  32. readln
  33. end.
Advertisement
Add Comment
Please, Sign In to add comment