Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- #define PI 3.141593
- int main (){
- float arreglo1[9]={0,PI*(1.0/4.0), PI*(1.0/2.0),PI*(3.0/4.0), PI, PI*(5.0/4.0), PI*(3.0/2.0), PI*(7.0/4.0),PI*(2.0)};
- float arreglo2[9];
- for (int i=0; i<9; i++)
- arreglo2[i]=cos(arreglo1[i]);
- for (int i=0; i<3; i++)
- printf("\n\t cos(%f) = %.4f\n",arreglo1[i+2],arreglo2[i+2]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement