Advertisement
mahmud11556

Untitled

Feb 22nd, 2021
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<math.h>
  3.  
  4. #define pi 3.14159265
  5. //function for area
  6. float area(float base,float height)
  7. {
  8. return 0.5*base*height;
  9. }
  10.  
  11.  
  12. int main()
  13. {
  14. float height,angle1,angle2,base,Area;
  15. scanf("%f%f%f",&height,&angle1,&angle2);
  16.  
  17. base=(tan(angle1*pi/180)+tan(angle2*pi/180))*height;
  18.  
  19. Area= area(base,height);
  20. printf("%.6f\n",Area);
  21.  
  22. return 0;
  23. }
  24.  
  25.  
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement