In this article, we will show you, How to write a C Program to find Angles of a Triangle if two angles are given with example.

## C Program to find Angles of a Triangle if two Angles are given

This program allows the user to enter two angles of a triangle and then finds the third angle

**TIP :** Sum of all angles in a triangle = 180

It means, if two angles of a triangle is given then third angle will be 180 – (angle 1 + angle 2)

/* C Program to find Angles of a triangle if two angles are give */ #include<stdio.h> int main() { float a, b, c; printf("\n Please Enter two angles of a triangle \n"); scanf("%f%f",&a,&b); c= 180 - (a + b); printf("\n Third Angle of a Triangle = %.2f\n", c); return 0; }

**OUTPUT**

Thank You for Visiting Our Blog

## Leave a Reply