The Lazy Caterer 's Problem | This function receives an integer n and returns the maximum number of pieces that can be made form pancake using n cuts ; Use the formula ; Driver Code
< ? php function findPieces ( $ n ) { return ( $ n * ( $ n + 1 ) ) / 2 + 1 ; } echo findPieces ( 1 ) , " STRNEWLINE " ; echo findPieces ( 2 ) , " STRNEWLINE " ; echo findPieces ( 3 ) , " STRNEWLINE " ; echo findPieces ( 50 ) , " STRNEWLINE " ; ? >