The task is to do a program in C++ that you have to put 3 angles for the triangle.
If all angles are 60, then printf isosceles.
If the three angles add up to 180 and two are the same then isosceles
If three add up 180 and no two angles are the same, scalene.
If the three do not add up to 180, Output error
int main(void)
{
int "%a", "%b", "%c";
printf("Enter angle a: ");
scanf("a");
printf("Enter angle b: ");
scanf("b");
printf("Enter angle c: ");
scanf("c");
if (a == b && b == c && c == a)
printf(" Equilateral Triangle");
else if (a == b || b == c || c == a)
printf("Isosceles Triangle");
else
printf("Scalene Triangle");
I am sorry it is in C, to run in visual studio express 2015 or visual studio.
Write a C program that reads in three angles (in degrees) and outputs the appropriate triangle type:
-If all three angles are 60, output equipateral
-If the three angles add up 180 and exactly two of the angles are the same, then outpu isosceles triangle.
-If the three angles add up to 180 and no two angles are the same, ouput scalene triangle.
-If the three angles do not add up to 180, output error.
Angle: a, b , c
If all three angles a, b, c are equal
Write Equilateral Triangle
If a is equal to be, but not c,
Write Isosceles Triangle
If the sum of a,b,c equal 180 but different angles
Write Scalene Triangle
If the sum of a, b, c >180
Write Error
@imii: Please don't post full solutions to homework problems - the point of homework is to learn how to do it yourself, and you are ruining someone's ability to learn that by just giving them the solutions directly.