Advertisement
dmkozyrev

task22

May 27th, 2015
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. #define _USE_MATH_DEFINES
  2. #include <math.h>
  3. #include <stdio.h>
  4.  
  5. int main(){
  6.     double x;
  7.     double eps = 0.00001;
  8.     for (x = M_PI/2; x <= M_PI; x += M_PI/1000){
  9.         if ( abs(sin(x) - x + 1) < eps)
  10.             printf("answer = %f\n", x);
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement