Advertisement
Guest User

Good shit prog

a guest
Sep 25th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 1.10 KB | None | 0 0
  1. program lab1v17b;
  2. USES CRT;
  3. var x, y, k:real;
  4. var h, q, f, t, n:real;
  5. begin
  6. clrscr;
  7.  
  8. writeln('Введите Х:');
  9. readln(x);
  10. writeln('Введите Y:');
  11. readln(y);
  12. writeln('Введите K:');
  13. readln(k);
  14.  
  15. if (k*x)=0 then begin
  16.    writeln('Делить на 0 нельзя! Введите другие числа!');
  17.    writeln('Для продолжения нажмите ENTER...');
  18.    readln();
  19.    exit;
  20.    end;
  21.  
  22. t:=ARCTAN(1/(k*x));
  23.  
  24. if t<=0 then begin
  25.    write('Невозможно посчитать натуральный логарифм!');
  26.    if (k>0) and (x<0) then
  27.       writeln('Введите другое значение Х!');
  28.    if (k<0) and (x>0) then
  29.       writeln('Введите другое значение K!');
  30.    writeln('Для продолжения нажмите ENTER...');
  31.    readln();
  32.    exit;
  33.    end;
  34.  
  35. q:=ln(t);
  36.  
  37. if y<0 then
  38.    h:=EXP(LN(ABS(8*y))/3)
  39.    else
  40.       if y>0 then
  41.          h:=exp(ln(y*8)/3)
  42.          else
  43.             h:=0;
  44.  
  45. if y<0 then
  46.    n:=-h
  47.    else
  48.       n:=h;
  49.  
  50. f:=n-(PI)*q;
  51.  
  52. writeln('F=', f:5:5);
  53. readln();
  54. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement