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