Write a program to check whether a triangle is valid or not, when the three angles of the triangle are entered by the user. A triangle is valid if the sum of all the three angles is equal to 180 degrees. Test Case 1 Input (stdin) 60 60 60 Expected Output Triangle is valid Test Case 2 Input (stdin) 60 50 56 Expected Output Triangle is not valid
#include <iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if( a == b) cout<<"Triangle is valid"; else cout<<"Triangle is not valid"; return 0; }