human
Give me a code to check for integer overflow on multiplication and the other steps required given the following:
Check for integer overflow on multiplication | Function to check whether there is overflow in a * b or not . It returns true if there is overflow ..
Check if either of them is zero.
Driver code"
Solution in Python:
assistant
#Here is code to check for integer overflow on multiplication and the other steps required.
 def isOverflow ( a , b ) :
	if ( a == 0 or b == 0 ) :
		return False
	result = a * b
	if ( result >= 9223372036854775807 or result <= - 9223372036854775808 ) :
		result = 0
	if ( a == ( result // b ) ) :
		print ( result // b )
		return False
	else :
		return True
if __name__ == " _ _ main _ _ " :
	a = 10000000000
	b = - 10000000000
	if ( isOverflow ( a , b ) ) :
		print ( " Yes " )
	else :
		print ( " No " )