fork download
  1. PROGRAM LAB (INPUT,OUTPUT);
  2. CONST
  3. K = 4.201;
  4. L = 3;
  5.  
  6. VAR
  7. x, a, b, y: REAL;
  8.  
  9. BEGIN
  10. WRITE('Enter value for x: ');
  11. READLN(x);
  12.  
  13. a := sqrt(K * sqrt(x) + 2 - (1 / L) * (exp(2) - exp(-2)));
  14. b := sin(0.5 * arctan(-0.25) * ln(5));
  15.  
  16. IF a > 2 * b THEN
  17. y := sqrt(3 * a - 5 * b)
  18. ELSE IF a = 2 * b THEN
  19. y := a
  20. ELSE
  21. y := sqrt(3 * a + 5 * b);
  22.  
  23. WRITELN('Result y = ', y:0:4);
  24. END.
  25.  
Success #stdin #stdout 0.01s 5292KB
stdin
3.14
stdout
Enter value for x: Result y = 2.9886