Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- long int t,i,a,b,c;
- while(scanf("%ld",&t)==1)
- {
- for(i=1;i<=t;i++)
- {
- scanf("%ld%ld%ld",&a,&b,&c);
- if(a+b<=c||b+c<=a||c+a<=b||a<=0||b<=0||c<=0)
- {
- printf("Case %ld: Invalid\n",i);
- }
- else if(a+b>c||b+c>a||c+a>b)
- {
- if(a==b&&b==c&&a==c)
- {
- printf("Case %ld: Equilateral\n",i);
- }
- else if(a==b||b==c||c==a)
- {
- printf("Case %ld: Isosceles\n",i);
- }
- else if(a!=b&&b!=c&&a!=c)
- {
- printf("Case %ld: Scalene\n",i);
- }
- }
- }
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment