program to find the type of triangle as inputted by the user


#include<stdio.h>
#include<conio.h>
void main()
{
long int a,b,c;
clrscr();
printf("enter sides of triangle\n");
scanf("%ld%ld%ld",&a,&b,&c);
if(a+b>c||b+c>a||c+a>b)
{
  if(a==b&&b==c)
  printf("equilateral triangle\n");
  if(a==b||b==c||c==a)
  printf("isoceles triangle\n");
  else
  printf("scalene triangle\n");
  }
  else
  printf(" wrong input");
 printf("thank you for using the program\n");
getch();
}

SIMPLE PROGRAMS
FUNCTIONS


NUMBERS


STRINGS AND CHARACTERS

Comments