Check whether Quadrilateral is valid or not if angles are given | Java program to check if a given quadrilateral is valid or not ; Function to check if a given quadrilateral is valid or not ; Check condition ; Driver code
class GFG { public static int Valid ( int a , int b , int c , int d ) { if ( a + b + c + d == 360 ) return 1 ; return 0 ; } public static void main ( String [ ] args ) { int a = 80 , b = 70 , c = 100 , d = 110 ; if ( Valid ( a , b , c , d ) == 1 ) System . out . println ( " Valid ▁ quadrilateral " ) ; else System . out . println ( " Invalid ▁ quadrilateral " ) ; } }