if the three of triangle are entered through the keyboard write a program to check whether the triangle is isosceles equilateral ,scalene or right angle triangle. #include<stdio.h> #include <conio.h> #include <math.h> int main() { int x,y,z; // side of triangle int max, flag=0; printf("Inter the first side:"); scanf("%d",&x); printf("Enter the second side"); scanf("%d"'&y); printf("Enter the third side"); scanf("%d"'&z); //equilateral means three (all) side are of same length if (x==y&&x==z) { printf ("Tringle is equilateral"); } //isosceles means two sides are of the length else if(x==y||y==z||z=x) { printf("Triangle is isosceles"); } //Right angle means it contains a 90 degree angle with pythogors theorem //check for maximum side max=x; if(y>max) m...
Comments
Post a Comment