Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Lab6 v1.1 Sin,cos,tan,cot
//gcc 5.4.0 //Start Program //Int in //double sin //double cos //double tan //double cot //READ x //COMPUTE sin(x) // sin=((x-3x^3)/3!)+((x^5)/5!)-(x^7)/7!); //COMPUTE cos(in) // cos=((1-x^2)/2!)+((x^4)/4!)-((x^6)/6!); //COMPUTE tan(in) // tan=sin/cos //COMPUTE cot(in) // cot=1/tan //PRINT sin, cos,tan, and cot //End Program // #include <stdio.h> int main(void) { int x; printf("%d\n",x); double sin; double cos; double tan; double cot; printf("Please input number to be trigged\n"); scanf("%d",&x); sin=((x-(x*x*x))/6)+((x*x*x*x*x)/120)-((x*x*x*x*x*x*x)/5040); cos=((1-(x*x))/2)+((x*x*x*x)/24)-((x*x*x*x*x*x)/720); tan=sin/cos; cot=1/tan; printf("sin=%lf\ncos=%lf\ntan=%lf\ncot=%lf\n",sin,cos,tan,cot); }
run
|
edit
|
history
|
help
0
Lab 7 blackjack v1.1
ele 888 lab 1 part 1
mypro
DUE TUESDAY
Add.c
1
fgets and basic string manipulation
Hello world
Linked List
150109_RecursividadFibonacci