Check whether triangle is valid or not if sides are given | function to check if three sider form a triangle or not ; check condition ; Driver Code ; function calling and print output
< ? php function checkValidity ( $ a , $ b , $ c ) { if ( $ a + $ b <= $ c $ a + $ c <= $ b $ b + $ c <= $ a ) return false ; else return true ; } $ a = 7 ; $ b = 10 ; $ c = 5 ; if ( checkValidity ( $ a , $ b , $ c ) ) echo " Valid " ; else echo " Invalid " ; ? >