Program to calculate the area between two Concentric Circles | Function to find area between the two given concentric circles ; Declare value of pi ; Calculate area of outer circle ; Calculate area of inner circle ; Difference in areas ; Driver Code
< ? php function calculateArea ( $ x , $ y ) { $ pi = 3.1415926536 ; $ arx = $ pi * $ x * $ x ; $ ary = $ pi * $ y * $ y ; return ( $ arx - $ ary ) ; } $ x = 2 ; $ y = 1 ; echo calculateArea ( $ x , $ y ) ; ? >