Войти

Показать полную графическую версию : портирование кода.


asacyra
19-01-2014, 18:52
Обьясните как перевески код с паскаля на с#
uses crt;
function f(x: real):real;
begin
f:=32+28*x-9*x*x;
end;
var
a, b: real;
n, i : integer;
h, res : real;
begin
write ('nigni ');
readln(a);
write ('verxni ');
readln(b);
write ('n= ');
readln (n);
h :=(b-a)/n;
res:=0;
for i:=1 to n do
res:=res +f(a+h*(i-0.5));
res:=h*res;
writeln('otvet',res:0:4);
readkey;
end.




© OSzone.net 2001-2012