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 170 views
1 answer 202 views
1 answer 354 views
2 answers 433 views
2 answers 437 views
1 answer 347 views
2 answers 604 views
...