Компьютерный форум OSzone.net  

Компьютерный форум OSzone.net (http://forum.oszone.net/index.php)
-   Программирование и базы данных (http://forum.oszone.net/forumdisplay.php?f=21)
-   -   портирование кода. (http://forum.oszone.net/showthread.php?t=276078)

asacyra 19-01-2014 18:52 2292247

портирование кода.
 
Обьясните как перевески код с паскаля на с#
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.


Время: 20:29.

Время: 20:29.
© OSzone.net 2001-