human
Find other two sides of a right angle triangle | Finds two sides of a right angle triangle if it they exist ..
if n is odd.
case of n = 1 handled separately.
case of n = 2 handled separately.
Driver Code"
Solution in Python:
assistant
#Here is code to find other two sides of a right angle triangle and the other steps required.
 def printOtherSides ( n ) :
	if ( n & 1 ) :
		if ( n == 1 ) :
			print ( - 1 )
		else :
			b = ( n * n - 1 ) // 2
			c = ( n * n + 1 ) // 2
			print ( " b ▁ = " , b , " , ▁ c ▁ = " , c )
	else :
		if ( n == 2 ) :
			print ( - 1 )
		else :
			b = n * n // 4 - 1
			c = n * n // 4 + 1
			print ( " b ▁ = " , b " , ▁ c ▁ = " , c )
a = 3
printOtherSides ( a )