Pizza cut problem ( Or Circle Division by Lines ) | Java program to find maximum no of pieces by given number of cuts ; Function for finding maximum pieces with n cuts . ; Driver Program to test above function
class GFG { static int findMaximumPieces ( int n ) { return 1 + n * ( n + 1 ) / 2 ; } public static void main ( String arg [ ] ) { System . out . print ( findMaximumPieces ( 3 ) ) ; } }