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 81 views
1 answer 116 views
2 answers 288 views
2 answers 295 views
1 answer 239 views
2 answers 470 views
2 answers 881 views
...