program Koldyshev mode objfpc uses IFDEF UNIX IFDEF UseCThreads cthrea

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
program Koldyshev;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes
{ you can add units after this };
var a,b,deistv:integer;
begin
readln(a);
readln(b);
writeln('1+,2-,3*,4/');
readln(deistv);
if deistv=1 then
writeln(a+b);
if deistv=2 then
writeln(a-b);
if deistv=3 then
writeln(a*b);
if deistv=4 then
writeln(a/b);
readln();
end.