Need Help in ANGTRICH - DSA learning series practice contest

Could someone help me about the approach, I have tried all possible ways but it gives wrong answer. Any suggestion?

Try to share the problem link whenever you post a doubt .

Regarding the problem you just have to check if the three angles sum up to 180 and each of them is non-zero.

#include "bits/stdc++.h"
using namespace std ;
int main(){
	int a,b,c;
	cin>>a>>b>>c ;
	cout <<(a+b+c==180&&a&&b&&c?"YES":"NO") ;
}

7 Likes

Thanks buddy for helping with this approach. : )

hey , i did the same thing but it’s showing me error , please check it for me ,THANKS.
#include <stdio.h>

int main() {
// your code goes here
long long int a,b,c;
scanf("%ld %ld %ld",&a,&b,&c);
long long int v,area;
v=a+b+c;
if(v==180){
printf(“YES\n”);
}
else{
printf(“NO\n”);
}
return 0;
}