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 89 views
1 answer 125 views
2 answers 303 views
2 answers 311 views
1 answer 257 views
2 answers 482 views
2 answers 892 views
...