/* * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025 * Repo: https://github.com/notamitgamer/bsc * License: MIT */ /* Write a program to check whether a triangle is valid or not, if three angles of the triangle are entered through the keyboard. A triangle is valid if the sum of all the three angles is equal to 180 degrees. */ /* Let Us C, Chap- 3, Page - 53, Qn No.: f(c) */ #include int main() { double angle1, angle2, angle3, sum; printf("Enter the value of the three angle of the triangle : "); scanf("%lf %lf %lf", &angle1, &angle2, &angle3); sum = angle1 + angle2 + angle3; if (sum == 180.0) printf("\nThis Triangle is a valid one."); else printf("\nThis Triangle is not valid. Sum of the angles : %g", sum); return 0; }