//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();
}
#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.