Find minimum possible values of A , B and C when two of the ( A + B ) , ( A + C ) and ( B + C ) are given | Java implementation of the approach ; Function to find A , B and C ; Keep minimum number in x ; Find the numbers ; Driver code ; Function call
import java . io . * ; class GFG { static void MinimumValue ( int x , int y ) { if ( x > y ) { int temp = x ; x = y ; y = temp ; } int a = 1 ; int b = x - 1 ; int c = y - b ; System . out . print ( a + " ▁ " + b + " ▁ " + c ) ; } public static void main ( String [ ] args ) { int x = 123 , y = 13 ; MinimumValue ( x , y ) ; } }