Найти паскаль program z232; var operation: byte; a,b: real; function summa(x,y: real): real; begin summa: =a+b end; function raznost(a,b: real): real; begin raznost: =a-b end; function delenie(a,b: real): real; begin delenie: =a/b end; function proizved(a,b: real): real; begin proizved: =a*b end; function sqrt(a,b: real): real; sqrt: =sqrt(a); sqrt: =sqrt(b); end; function abs(a.b: real): real; abs: =abs(a); abs: =abs(b): end; function sin(a.b: real): real; sin: =sin(a); sin: =sin(b); end; function cos(a.b: real): real; cos: =cos(a); cos: =cos(b); end; function tan(a.b: real): real; tan: =tan(a); tan: =tan(b); end; function sqr(a.b: real): real; sqr: =sqr(a); sqr: -sqr(b); end; begin writeln('a'); read(a); writeln('b'); read(b); writeln('1 - сложить'); writeln('2 - вычесть'); writeln('3 - разделить'); writeln('4 - умножить'); writeln('5 - корень'); writeln('6 - модуль'); writeln('7 - синус'); writeln('8 - косинус'); writeln('9 - тангенс'); writeln('10 - квадрат'); read(operation); case operation of 1: writeln(summa(a.b)); 2: writeln(raznost(a.b)); 3: writeln(delenie(a.b)); 4: writeln(proizved(a.b)); 5: writeln(sqrt(a.b)); 6: writeln(abs(a.b)); 7: writeln (sin(a.b)); 8: writeln(cos(a.b)); 9: writeln(tan(a.b)); 10: writeln(sqr(a.b)); end; end.
var
operation: byte;
a, b: real;
function summa(x, y: real): real;
begin
summa := a + b
end;
function raznost(a, b: real): real;
begin
raznost := a - b
end;
function delenie(a, b: real): real;
begin
delenie := a / b
end;
function proizved(a, b: real): real;
begin
proizved := a * b
end;
function sqrt(a, b: real): real;
begin
sqrt := sqrt(a);
sqrt := sqrt(b);
end;
function abs(a, b: real): real;
begin
abs := abs(a);
abs := abs(b);
end;
function sin(a, b: real): real;
begin
sin := sin(a);
sin := sin(b);
end;
function cos(a, b: real): real;
begin
cos := cos(a);
cos := cos(b);
end;
function tan(a, b: real): real;
begin
tan := tan(a);
tan := tan(b);
end;
function sqr(a, b: real): real;
begin
sqr := sqr(a);
sqr := sqr(b);
end;
begin
writeln('a');
read(a);
writeln('b');
read(b);
writeln('1 - сложить');
writeln('2 - вычесть');
writeln('3 - разделить');
writeln('4 - умножить');
writeln('5 - корень');
writeln('6 - модуль');
writeln('7 - синус');
writeln('8 - косинус');
writeln('9 - тангенс');
writeln('10 - квадрат');
read(operation);
case operation of
1: writeln(summa(a, b));
2: writeln(raznost(a, b));
3: writeln(delenie(a, b));
4: writeln(proizved(a, b));
5: writeln(sqrt(a, b));
6: writeln(abs(a, b));
7: writeln(sin(a, b));
8: writeln(cos(a, b));
9: writeln(tan(a, b));
10: writeln(sqr(a, b));
end;
end.