Program to find minimum number of lectures to attend to maintain 75 % | Java Program to find minimum number of lectures to attend to maintain 75 % attendance ; Method to compute minimum lecture ; Formula to compute ; Driver Code
public class GFG { static int minimumLectures ( int m , int n ) { int ans = 0 ; if ( n < ( int ) Math . ceil ( 0.75 * m ) ) ans = ( int ) Math . ceil ( ( ( 0.75 * m ) - n ) / 0.25 ) ; else ans = 0 ; return ans ; } public static void main ( String [ ] args ) { int M = 9 , N = 1 ; System . out . println ( minimumLectures ( M , N ) ) ; } }