human
What is a code to find the last two missing digits of the given phone number and the other steps required given the following:
Find the last two missing digits of the given phone number | Function to find the last two digits of the number and print the complete number.
Sum of the first eight digits of the number.
if sum < 10 , then the two digits are '0' and the value of sum.
if sum > 10 , then the two digits are the value of sum.
Driver code"
Solution in Python:
assistant
#Here is code to find the last two missing digits of the given phone number and the other steps required.
 def findPhoneNumber ( n ) :
	temp = n
	sum = 0
	while ( temp != 0 ) :
		sum += temp % 10
		temp = temp // 10
	if ( sum < 10 ) :
		print ( n , "0" , sum )
	else :
		n = str ( n )
		sum = str ( sum )
		n += sum
		print ( n )
if __name__ == ' _ _ main _ _ ' :
	n = 98765432
	findPhoneNumber ( n )