var i: double;
begin
i:=1;
writeln(Ln(i));
end.
///Returns the integral
function Integral(var x: integer; n: integer): real;
var
tng, temp: real;
n1, n2: real;
begin
if n = 1 then
begin
n1 := (Pi / 4);
n2 := (x / 2);
tng := tan(n1 + n2);
temp := ln(tng);
integral := temp;
//the compiler incorrectly considers the logarithm!!!
end;
if n = 0 then
integral := x;
if n >= 2 then
integral := ((1 / n - 1) * (sin(x)) / power(cos(x), n - 1)) + (((n - 2) / (n - 1)) * integral(x, n - 2))
else
end;
//To deal with reference to the parameters
var
x: integer;
n: integer;
begin
writeln('read(x)');
read(x);
writeln('phony(n)');
phony(n);
//writeln('Integral of dx/(cos', x, ')^', n, '=', integral(x, n));
end.
Find more questions by tags Pascal