+ 1
<GeeksforGeeks>Largest proper fraction
Largest proper fraction with sum of numerator and denominator equal to a given number We are provided with a number N. Find the biggest proper fraction a/b such that a + b = N. Following are constraints for fraction.a/b is a proper fraction if a<b and a and b are coprimes i.e no common factor of a and b.There can be multiple proper fractions with sum of numerator and denominator equal to a given number. The main task is to find the fraction having the maximum floating point value.E.g. In: N = 3 Out 1 2
1 Respuesta
+ 1