UVa Problem Solution 11479 – Is this the easiest problem?

Problem Solving, UVa

 

#include<stdio.h>

int main()

{

 long int t,a,b,c,i;

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 && b==c&&c==a)

 printf("Case %ld: Equilateral\n",i);

 else if(a==b || b==c || c==a)

 printf("Case %ld: Isosceles\n",i);

 else

 printf("Case %ld: Scalene\n",i);



}



}

return 0;

}

 

0 Comments

You may find interest following article

Complete Guide: Create Laravel Project in Docker Without Local Dependencies

Create Laravel Project Through Docker — No Need to Install PHP, MySQL, or Apache on Your Local Machine In this tutorial, I’ll show you how to create and run a full Laravel project using Docker containers. That means you won’t have to install PHP, MySQL, or Apache locally on your computer. By the end of this guide, you’ll have a fully functional Laravel development...