# I dont get where I was wrong

Functional Description : If All the Sides are Equal then it is a Equilateral Triangle If two Sides are Equal then it is an Isosceles Triangle If no Sides are Equal then it is a Scalene TriangleConstraints:1<=side1<=1001<=side2<=1001<=side3<=100Input Format:Only line of integer has three values of type integer separated by a space representing 'side1','side2' and 'side3'.Output Format: Print as either equilateral or scalene or isosceles triangle based on the values of the sides. https://code.sololearn.com/cGAv70K5VYum

12/2/2021 7:47:52 AM

morgan14 Answers

New AnswerMay I have a look at the question ? In case of an online judge, it can also be a case where you might be giving extra or less output than required.

I didn't say I am getting wrong output but it says my logic I used in code is wrong according to question

morgan What happens if the dimensions given can't make a triangle? Is this a factor within the challenge details?

morgan I also note there is \n after Isosceles triangle. Sometimes this can make a difference

Problem Description:Simon was working in a Casa Grande. His superior officer ordered him to construct a new building by incorporating equilateral, scalene and isosceles triangular shapes wherever possible. But he has no idea about equilateral, scalene and isosceles triangle. Can you clarify his doubt by giving him the correct category of triangle based on the values of sides given by simon?Functional Description : If All the Sides are Equal then it is a Equilateral Triangle If two Sides are Equal then it is a Isosceles Triangle If no Sides are Equal then it is a Scalene TriangleConstraints:1<=side1<=1001<=side2<=1001<=side3<=100Input Format:Only line of integer has three values of type integer separated by a space representing 'side1','side2' and 'side3'. Output Format: Print as either equilateral or scalene or isosceles triangle based on the values of the sides. this is the complete question

#include <stdio.h> int main() { int side1,side2,side3; printf ("Enter three value : "); scanf("%d %d %d",&side1,&side2,&side3); if (side1==side2 && side2==side3) { printf("Equilaterial triangle"); } else if (side1==side3 || side2==side1 || side2==side3) { printf("Isosceles triangle\n"); } else { printf("Scalene triangle"); } return 0; }