find angles of a triangle

#include<stdio.h>
int main()
{
      int a, b, c;
      scanf("%d%d", &a, &b);
      c = 180 - (a + b);
      printf("Third angle of the triangle = %d", c);
    return 0;
}
Input:
30 60
Output:
Third angle of the triangle =90

No comments:

Post a Comment