fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main() {
  5.  
  6. float x;
  7. scanf("%f", &x);
  8. float f;
  9. f=x-(x*x*x)/6+pow(x, 5)/120;
  10. float b;
  11. b=abs(sin(x)-f);
  12. printf("%f", b) ;
  13.  
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 3348KB
stdin
1.57




stdout
0.004509