How to calculate PI value with asin() function in C

1 Answer

0 votes
#include <stdio.h>     
#include <math.h>
  
int main()
{   
    double pi = 2 * asin(1.0); 
     
    printf("pi = %lf\n", pi);
     
    return 0;
}


  
/*
run:
    
pi = 3.141593
 
*/

 



answered Oct 4, 2024 by avibootz

Related questions

1 answer 173 views
1 answer 205 views
1 answer 356 views
2 answers 435 views
2 answers 440 views
1 answer 349 views
2 answers 606 views
...