How to calculate tangent in C

1 Answer

0 votes
#include <stdio.h>
#include <math.h>

int main(void)
{
	double pi = 3.14159;

	double x = tan(pi / 5);

	printf("%f\n", x);

	return 0;
}




/*
run:

0.726542

*/

 



answered Apr 12, 2022 by avibootz

Related questions

1 answer 194 views
3 answers 332 views
3 answers 273 views
273 views asked Jan 26, 2023 by avibootz
1 answer 314 views
...