How to use acos() to compute PI in C

1 Answer

0 votes
#include <stdio.h>
#include <math.h>
 
int main(void)
{
    double PI = acos(-1);
   
    printf("acos(-1) = %f", PI);
 
    return 0;
}
  
/*
run:
 
acos(-1) = 3.141593

*/

 



answered Aug 27, 2016 by avibootz

Related questions

2 answers 445 views
2 answers 1,037 views
2 answers 274 views
2 answers 251 views
2 answers 285 views
2 answers 275 views
...