Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<math.h>
- #define pi 3.14159265
- //function for area
- float area(float base,float height)
- {
- return 0.5*base*height;
- }
- int main()
- {
- float height,angle1,angle2,base,Area;
- scanf("%f%f%f",&height,&angle1,&angle2);
- base=(tan(angle1*pi/180)+tan(angle2*pi/180))*height;
- Area= area(base,height);
- printf("%.6f\n",Area);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement