Перевод программы с++ на паскаль! #include #include const float e = 0.0001; int main() { float x; std: : cin > > x; float a = (x - 1 ) / x; float s = a; int n = 2; do { a *= (x - 1 ) / x * (n - 1) / n; s += a ; n++ ; } while ( a > e / n ); std: : cout < < log( x ) < < " " < < s < < std: : endl; system( "pause" ); return 0; }
begin
var e:=0.0001;
var x:=ReadReal;
var a:=(x-1)/x;
var (s,n):=(a,2);
repeat
a*=(x-1)/x*(n-1)/n;
s+=a;
n+=1
until a<=e/n;
Writeln(log(x),' ',s)
end.