Write a C++ program to check triangle by entering 3 angles

Write a C++ program to check triangle by entering 3 angles

Write a C++ program to check triangle by entering 3 angles

Object:

Write a C++ program to check triangle by entering 3 angles. C++ Projects.

Code:

#include<iostream>
#include<conio.h>

using namespace std;
void main()
{
float ang1, ang2, ang3;
cout<<“\n\t*******************************************************************\n”;
cout<<“\t\t:P r o g r a m to c h e c k T r i a n g l e:\n”;
cout<<“\t*******************************************************************\n\n”;
cout<<“Enter the Angles of Triangle.\n”;
cout<<“Enter Angle 1: “;
cin>>ang1;
cout<<“Enter Angle 2: “;
cin>>ang2;
cout<<“Enter Angle 3: “;
cin>>ang3;
if(ang1+ang2+ang3 == 180)
{
cout<<“Triangle is Valid.”;
}
else
{
cout<<“Triangle is Invalid.”;
}
getch();
}

 

Output:

Write a C++ program to check triangle by entering 3 angles Write a C++ program to check triangle by entering 3 angles

Another Program: Write a C++ program that asks for the number of units sold and computes the total cost of the purchase.

M.A Siddiqui

Hi, I am M.A Siddiqui. I'm a Computer Science Student, In this website, I'm teaching you Multiple languages and provides Projects and other Subjects Notes.

You may also like...

1 Response

  1. September 10, 2020

    […] Write a C++ program to check triangle by entering 3 angles […]

Leave a Reply

Your email address will not be published. Required fields are marked *