<span>program</span><span> kalkulator; </span>
<span>uses</span><span> crt; </span>
<span>var</span><span> a</span><span>,</span><span>b</span><span>,</span><span>c</span><span>:</span><span>real</span><span>; </span>x<span>:</span><span>integer</span>;
<span>Begin</span>
clrscr;
<span>Writeln</span><span>(</span><span>'введите 2 числа'</span><span>)</span>;
<span>Readln</span><span>(</span>a<span>,</span>b<span>)</span>;
<span>Writeln</span><span>(</span><span>'выберете действие'</span><span>)</span>;
<span>Writeln</span><span>(</span><span>'1-"+" 2-"-" 3-"*" 4-"/"'</span><span>)</span>;
<span>Readln</span><span>(</span>x<span>)</span>;
<span>case</span> x <span>of</span>
<span>1</span><span>:</span><span>begin</span> c<span>:=</span>a<span>+</span>b; <span>Writeln</span><span>(</span>c<span>:</span><span>2</span><span>:</span><span>2</span><span>)</span>; <span>end</span>;
<span>2</span><span>:</span><span>begin</span> c<span>:=</span>a<span>-</span>b; <span>Writeln</span><span>(</span>c<span>:</span><span>2</span><span>:</span><span>2</span><span>)</span>; <span>end</span>;
<span>3</span><span>:</span><span>begin</span> c<span>:=</span>a<span>*</span>b; <span>Writeln</span><span>(</span>c<span>:</span><span>2</span><span>:</span><span>2</span><span>)</span>; <span>end</span>;
<span>else</span><span>begin</span> c<span>:=</span>a<span>/</span>b; <span>Writeln</span><span>(</span>c<span>:</span><span>2</span><span>:</span><span>2</span><span>)</span>;
<span>end</span>;
<span>end</span>;
<span>Readln</span>;
<span>end</span>.