All triangle between q and p are acute triangles . So add q - p in z .
$ z += $ q - $ p ; } } } echo " Acute ▁ Triangle : ▁ " , $ x , " STRNEWLINE " ; echo " Right ▁ Triangle : ▁ " , $ y , " STRNEWLINE " ; echo " Obtuse ▁ Triangle : ▁ " , $ z , " STRNEWLINE " ; }