COMPUTER GAYN
Q. Write the C program to find the type of triangle taking length of 3 sides from user using nested if function?
ans:-
#include<stdio.h>
int main()
{
int side1,side2,side3;
printf("enter three sides of triangle:\n");
scanf("%d%d%d",&side1,&side2,&side3);
if(side1==side2 && side2==side3)
{
printf("this is a quilateral triangle \n");
}
else if (side1==side2||side1==side3||side2==side3)
{
printf("this is an isoscaleous triangle \n");
}
else
{
printf("this is an scalen triangle");
}
return 0;
}

0 Comments