Program to find the rate percentage from compound interest of consecutive years | Function to return the required rate percentage ; Driver code
< ? php function Rate ( $ N1 , $ N2 ) { $ rate = ( $ N2 - $ N1 ) * 100 / $ N1 ; return $ rate ; } $ N1 = 100 ; $ N2 = 120 ; echo Rate ( $ N1 , $ N2 ) , " % " ; ? >