-->
Showing posts with label a program to know a triangle is equilateral or not.. Show all posts
Showing posts with label a program to know a triangle is equilateral or not.. Show all posts

Write a program to know a triangle is equilateral or not.

//a program to know a triangle is equilateral or not.
#include<stdio.h>
#include<conio.h>
void main()
{
int x,y,z;                          // x,y z are sides
printf("enter 3 sides\n");
scanf("%d%d%d",&x,&y,&z);
if(x==y && y==z)
{
printf("it is an equilateral  triangle");
}
else
{
printf("it is not");
}
getch();
}

note:
you can use also use angle concept.