SHARE
TWEET

Лаба 1.3

a guest Sep 16th, 2019 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program Project3;
  2.  
  3. {$APPTYPE CONSOLE}
  4. {$R *.res}
  5.  
  6. uses
  7.    System.SysUtils, Math;
  8.  
  9. var
  10.    E, x, fun, delta: real;
  11.    i, k: integer;
  12.    IsCorrect: Boolean;
  13.  
  14. begin
  15.    IsCorrect := False;
  16.    Writeln('Введите точность E (0<E<1)');
  17.    repeat
  18.       try
  19.          readln(E);
  20.          if (E < 1) and (E > 0) then
  21.             IsCorrect := TRUE
  22.          else
  23.             Writeln('Введите число меньшее 1 и больше 0');
  24.       except
  25.          Writeln('Введите число ');
  26.       end;
  27.    until (IsCorrect);
  28.    IsCorrect := False;
  29.    Writeln('Введите Х');
  30.    repeat
  31.       try
  32.          readln(x);
  33.          IsCorrect := TRUE;
  34.       except
  35.          Writeln('Введите число ');
  36.       end;
  37.    until (IsCorrect);
  38.    fun := Tan(1.5773 * x) / 2.3041;
  39.    delta := fun - x;
  40.    x := fun;
  41.    While delta > E do
  42.    begin
  43.       fun := Tan(1.5773 * x) / 2.3041;
  44.       delta := fun - x;
  45.       x := fun;
  46.    end;
  47.    Writeln('Корень уравнения равен ', x:7:5);
  48.    readln(x);
  49.  
  50. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top