Advertisement
193030

2.4 Tabular function

Sep 23rd, 2019
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.47 KB | None | 0 0
  1. program functionTab;
  2. var
  3. //y : double;
  4. i: real=-2;
  5. x: double;
  6. begin
  7.     while(i<=5) do
  8.         begin
  9.             if(i<=0) then
  10.             begin
  11.                 x:=0;
  12.             end;
  13.             if(i<=1) then
  14.             begin
  15.                 x:=i;
  16.             end;
  17.             if(i>1) then
  18.             begin
  19.                 x:=i*i*i*i;
  20.             end;
  21.             write('The value of x is: ');
  22.             writeln(x);
  23.             i:=i+0.45;
  24.         end;
  25. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement