human
Sum of two numbers if the original ratio and new ratio obtained by adding a given number to each number is given | Function to return the sum of numbers which are in the ration a : b and after adding x to both the numbers the new ratio becomes c : d.
Driver code"
Solution in Python:
assistant
#Here is code to sum of two numbers if the original ratio and new ratio obtained by adding a given number to each number is given and the other steps required.
 def sum ( a , b , c , d , x ) :
	ans = ( ( x * ( a + b ) * ( c - d ) ) / ( ( a * d ) - ( b * c ) ) ) ;
	return ans ;
if __name__ == ' _ _ main _ _ ' :
	a , b , c , d , x = 1 , 2 , 9 , 13 , 5 ;
	print ( sum ( a , b , c , d , x ) ) ;