Advertisement
CyberPascal

Untitled

Mar 24th, 2014
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.54 KB | None | 0 0
  1. Program Lab8_22; uses crt;
  2.  
  3. const c=0.000372;
  4.  
  5. var y:real;
  6.     i,x:byte;
  7.  
  8. Function xPow(x:real; n:real):real;
  9. var pow:real;
  10.     k:integer;
  11. Begin
  12. if (X < 0) then Pow:=(-1)*Exp(N*Ln(Abs(X)))
  13.           else if (X > 0) then Pow:=Exp(N*Ln(Abs(X)))
  14.                            else xPow:=0;
  15.  
  16. K:=Round(N);
  17. if not Odd(K) then Pow:=Abs(Pow);
  18. if (N = 0) then Pow:=1;
  19.  
  20. xPow:=Pow
  21. end;
  22.  
  23. Begin clrscr;
  24. X:=0;
  25.  
  26. for i:=1 to 4 do
  27. Begin
  28. Inc(X,2);
  29. Y:=xPow(X,0.73)+(3.42/(C*X))+xPow((x+1),(1/3));
  30. Writeln(' Y[',i,']= ',Y:8:5);
  31. end;
  32.  
  33. Readln;
  34. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement