Find the maximum possible value for the given periodic function | Java program to find the maximum possible value for the given function ; Function to return the maximum value of f ( x ) ; Driver Code
class GFG { public static int floorMax ( int A , int B , int N ) { int x = Math . min ( B - 1 , N ) ; return ( A * x ) / B ; } public static void main ( String [ ] args ) { int A = 11 , B = 10 , N = 9 ; System . out . println ( floorMax ( A , B , N ) ) ; } }