/* * trigfunctions.c */ #include #include int main(void) { double pi=3.141592; double ss=0; double cc=0; double tt=0; double ee=2.71828; double lb=10000; printf("Constant pi is accepted as 3.141592 for the following calulations\n"); printf("Constant ee is accepted as 2.71828 for the following calulations\n"); printf("sin(xx) returns the sine of xx:\n"); printf("sin of raidan 0 is: %.2f\n", sin(ss) ); printf("sin of pi/6 is: %.2f\n\n", sin(pi/6) ); printf("sin of pi/2 is: %.2f\n\n", sin(pi/2) ); printf("cos(xx) returns the cosine of xx:\n"); printf("cos of radian 0 is:%.2f\n", cos(cc) ); printf("cos of pi/3 is: %.2f \n", cos(pi/3) ); printf("cos of pi/2 is: %.2f \n", cos(pi/2) ); printf("tan(xx) retunrs the tangent of xx\n"); printf("tangent of radian 0 is: %.2f\n", tan(tt) ); printf("tangent of pi/4 is: %.2f\n", tan(pi/4) ); printf("log(xx) returns the natural logarithm ln(xx) where xx is larger than 0:\n"); printf("log of ee is: %.2f\n\n", log(ee) ); printf("log10(xx) returns the base 10 logarithm:\n" ); printf("log of 10000 is: %.2f\n\n", log10(lb) ); return 0; }