Q-9.Write a C Program to input two angles from user and find third angle of the triangle. How to find all angles of a triangle if two angles are given by user using C programming. C program to calculate the third angle of a triangle if two angles are given.
Author -
admin
July 06, 2019
0
#include<stdio.h>
#define SUM 180
int main(){
//1
float firstAngle,secondAngle,thirdAngle;
//2
printf("Enter first and second angle of the triangle : ");
scanf("%f %f",&firstAngle,&secondAngle);
//3
thirdAngle = SUM - (firstAngle + secondAngle);
//4
printf("You have entered %f and %f\n",firstAngle,secondAngle);