Program to find the Area and Perimeter of a Semicircle | Function for calculating the area ; Formula for finding the area ; Function for calculating the perimeter ; Formula for finding the perimeter ; Get the radius ; Find the area ; Find the perimeter
< ? php function area ( $ r ) { return ( 0.5 ) * ( 3.14 ) * ( $ r * $ r ) ; } function perimeter ( $ r ) { return ( 3.14 ) * ( $ r ) ; } $ r = 10 ; echo " The ▁ Area ▁ of ▁ Semicircle : ▁ " , area ( $ r ) , " STRNEWLINE " ; echo " The ▁ Perimeter ▁ of ▁ Semicircle : ▁ " , perimeter ( $ r ) , " STRNEWLINE " ; ? >