fork download
  1. Program Lab2 (Input, Output);
  2. Var
  3. x, y: real;
  4. Begin
  5. writeln('Please enter value for x');
  6. readln(x);
  7. y := sin(frac(x / 2)) * sqr(cos(frac(x / 2)));
  8. writeln('Result is y=', y);
  9. End.
Success #stdin #stdout 0.01s 5284KB
stdin
2
stdout
Please enter value for x
Result is y= 0.0000000000000000E+000