Thursday, December 21, 2017

11936 - The Lazy Lumberjacks Uva Solution & Logic

//
Extremely Basic 

* To Make A Triangle , The summation of Two lengths of triangle  obviously should be greater than third length
///


Now See Code ....................


#include<bits/stdc++.h>

// Nayeem Shahriar Joy , Applied Physics & Electronic Engineering , University of Rajshahi.

using namespace std;


    int main()
{
int a,b,c,i,t;
while(scanf("%d",&t)==1)
{
while(t--){
 scanf("%d%d%d",&a,&b,&c);
 if(a+b<=c || b+c<=a || a+c<=b)
 printf("Wrong!!\n");
 else
 printf("OK\n");
 }
}
}

No comments:

Post a Comment