Write a C++ program to check whether a triangle is valid or not, your program should have the following function:

checktriangle(int,int,int)

This function takes the three integer type variables as the angle of three sides. And perform the validity check for the triangle as follows:

A triangle is valid if the sum of all the three angles is equal to 180 degrees.

After performing the validity check function should display the appropriate message i.e. either triangle is valid or not valid.

Sample Output:

Enter the first angle

45

Enter the second angle

45

Enter the third angle

90

valid triangle

Press any key to continueâ€¦