C program to find third angle of triangle

Previous
Next

Input

            Enter first angle: 60

            Enter second angle: 80

Output

            Third angle = 40

#include <stdio.h>
int main()
{
    int a, b, c;

    printf("Enter two angles of triangle: ");
    scanf("%d%d", &a, &b);

    c = 180 - (a + b);
    printf("Third angle is = %d", c);
    return 0;
}
Previous
Next

Add Comment

Courses Enquiry Form