fork download
  1. Program Calculation (input, output);
  2. const
  3. K = 2;
  4. L = 7390;
  5. var
  6. x, y, a, b: real;
  7. n: integer;
  8. begin
  9. writeln('Please enter number of X');
  10. readln(n);
  11.  
  12. case n of
  13. 1: x := 0.456;
  14. 2: x := 1.329;
  15. 3: x := 2.473;
  16. else
  17. begin
  18. writeln('No number');
  19. exit;
  20. end;
  21. end;
  22.  
  23. a := (L * x) / (Exp(5 * Ln(x)) * (Exp(K) - 1));
  24. writeln('Result is A = ', a);
  25.  
  26. b := Sqrt(Exp((x - 1) / Sin(x)) + Cos(x));
  27. writeln('Result is B = ', b);
  28.  
  29. if a >= 5 * b then
  30. begin
  31. y := Ln(2 * a - 3 * b * Exp(-x));
  32. end
  33. else
  34. begin
  35. y := Ln(3 * a - 2 * a * Exp(-x));
  36. end;
  37.  
  38. writeln('Result is Y = ', y);
  39. end.
Success #stdin #stdout 0s 5292KB
stdin
Standard input is empty
stdout
Please enter number of X
No number