Advertisement
Tahamina_Taha

angles of triangle

Jul 20th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. //angles of triangle
  2. #include<stdio.h>
  3. #include<math.h>
  4. int main(){
  5.     int a1,a2,a3;
  6.     printf("Enter first angle: \n");
  7.     scanf("%d",&a1);
  8.     printf("Enter second angle: \n");
  9.     scanf("%d",&a2);
  10.     a3=180-(a1+a2);//sum of angles of a triangle is a+b+c=180
  11.     printf("Third angle = %d",a3);
  12.     return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement