tag:blogger.com,1999:blog-5567635208854255303.post715202965212156004..comments2023-10-29T18:47:24.632+05:30Comments on Amit Ranjan : A Digital Marketer | Teacher | Artist from Sitamarhi: If the three sides of a triangle are entered through the keyboard, write a program to check whether the triangle is isosceles, equilateral, scalene or right angled triangle.Amit Ranjanhttp://www.blogger.com/profile/04646376368196844392noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-5567635208854255303.post-61368879529731761872020-01-04T23:08:17.153+05:302020-01-04T23:08:17.153+05:30i saw the code, the logic is correct but why on pu...i saw the code, the logic is correct but why on putting 3 same values it is saying This triangle is an equilateral triangle.This triangle is an isosceles triangle. i can't understandAnonymoushttps://www.blogger.com/profile/16541739509721107367noreply@blogger.comtag:blogger.com,1999:blog-5567635208854255303.post-13911770872538089192020-01-04T23:05:19.235+05:302020-01-04T23:05:19.235+05:30on putting 3 values 5,5,5, the output is : This tr...on putting 3 values 5,5,5, the output is : This triangle is an equilateral triangle.This triangle is an isosceles triangle.Anonymoushttps://www.blogger.com/profile/16541739509721107367noreply@blogger.comtag:blogger.com,1999:blog-5567635208854255303.post-72913372589405404382014-07-07T19:26:28.941+05:302014-07-07T19:26:28.941+05:30TRY This, it'll never fail... no matter if you...TRY This, it'll never fail... no matter if you enter +ve, -ve or even 0 values.<br />here's the code i have written-<br /><br /># include<br />int main()<br />{<br />float a,b,c,s;<br />printf("enter the sides of the triangle\n");<br />scanf("%f%f%f",&a,&b,&c);<br />if((a!=0&&a>0)&&(b!=0&&b>0)&&(c!=0&&c>0))<Anonymoushttps://www.blogger.com/profile/01294625145121622050noreply@blogger.comtag:blogger.com,1999:blog-5567635208854255303.post-68256435497278303942013-09-24T09:09:46.496+05:302013-09-24T09:09:46.496+05:30Plz, compile it on your TurboC compiler. It will d...Plz, compile it on your TurboC compiler. It will definitely give the right result. Because, triangle with sides 5,4,3 is both scalene and right angled triangle and this program tells this in this code.Amit Ranjanhttps://www.blogger.com/profile/04646376368196844392noreply@blogger.comtag:blogger.com,1999:blog-5567635208854255303.post-7964408865369055492013-09-24T07:58:12.661+05:302013-09-24T07:58:12.661+05:30but if we give input as 5,4,3 it will take it as s...but if we give input as 5,4,3 it will take it as scalene triangle..then how i will get right angled triangle...Anonymoushttps://www.blogger.com/profile/11115644553913740579noreply@blogger.comtag:blogger.com,1999:blog-5567635208854255303.post-90826461367289866462013-09-07T13:12:51.092+05:302013-09-07T13:12:51.092+05:30Sorry!! its my mistake and thanks to remind me abo...Sorry!! its my mistake and thanks to remind me about my mistake .....<br />I m going to make it right ....Amit Ranjanhttps://www.blogger.com/profile/04646376368196844392noreply@blogger.comtag:blogger.com,1999:blog-5567635208854255303.post-57739139013976900052013-09-06T22:39:59.556+05:302013-09-06T22:39:59.556+05:30if(a==b && b==c)
printf("This tria... if(a==b && b==c)<br /> printf("This triangle is an equilateral triangle.");<br />never be true in your codeAnonymoushttps://www.blogger.com/profile/04631874268952098918noreply@blogger.comtag:blogger.com,1999:blog-5567635208854255303.post-26760183375108936492013-09-06T22:38:04.095+05:302013-09-06T22:38:04.095+05:30on a=3
b=3
c=3
out put is wronge
on a=3<br />b=3<br />c=3<br />out put is wronge<br />Anonymoushttps://www.blogger.com/profile/04631874268952098918noreply@blogger.com