Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- #include <stdlib.h>
- #define pi M_PI
- #define dt 0.01745329252
- double rad(double x) {
- return x*pi/180;
- }
- int main(int argc, char *argv[])
- {
- double t1, t11, t2, t22, m;
- double n = atof(argv[1]); // ./a.out n
- for (t2=0;t2<=90;t2+=5)
- {
- t22 = rad(t2) + dt;
- t1 = asin(sin(rad(t2))/n);
- t11 = asin(sin(t22)/n);
- m = (tan(t1)-tan(t11))/(tan(rad(t2))-tan(t22));
- printf("%lf %lf %lf %lf %lf \n",t2,t22,t1,t11,m);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement