Even | C # program to find max ( X , Y ) / min ( X , Y ) after P turns ; Driver code ; 1 st test case ; 2 nd test case
using System ; class GFG { public static int findValue ( int X , int Y , int P ) { if ( P % 2 == 0 ) return ( Math . Max ( X , Y ) / Math . Min ( X , Y ) ) ; else return ( Math . Max ( 2 * X , Y ) / Math . Min ( 2 * X , Y ) ) ; } public static void Main ( ) { int X = 1 , Y = 2 , P = 1 ; Console . WriteLine ( findValue ( X , Y , P ) ) ; X = 3 ; Y = 7 ; P = 2 ; Console . WriteLine ( findValue ( X , Y , P ) ) ; } }