Skip to content

Instantly share code, notes, and snippets.

@opilar
Created November 24, 2012 17:52
Show Gist options
  • Save opilar/4140682 to your computer and use it in GitHub Desktop.
Save opilar/4140682 to your computer and use it in GitHub Desktop.
7
program Project2;
{$APPTYPE CONSOLE}
uses
math;
var x,f,xo,xk,h,a,b:real;
begin
write('Vvedite xo= ');
readln(xo);
write('Vvedite xk= ');
readln(xk);
write('Vvedite h= ');
readln(h);
x:=xo;
a:=b;
while x <= xk do
begin
if x<0 then
f:=arctan(x)+sqrt(x+3);
else if x=0 then
f:=(a-b)+cos(pi*x);
else x>0 then
f:=x*x*x*(cos(pi*x/2)/sin(pi*x/2));
writeln ('x= ', x:3:2);
writeln ('f= ', f:3:2);
x:=x+h
end;
readln;
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment