Number of chocolates left after k iterations | Function to find the chocolates left ; Driver code
< ? php function results ( $ n , $ k ) { return round ( pow ( $ n , ( 1.0 / pow ( 2 , $ k ) ) ) ) ; } $ k = 3 ; $ n = 100000000 ; echo ( " Chocolates ▁ left ▁ after ▁ " ) ; echo ( $ k ) ; echo ( " ▁ iterations ▁ are ▁ " ) ; echo ( results ( $ n , $ k ) ) ; ? >