Computer Science, asked by priya270398, 7 months ago

write a program to read two integer values and print true if both the number end with the same digit otherwise print false.Example if 698 and 768 are given program should print true as they both end with 8.
enter two interger values :23 53 then the program should print the result false

Answers

Answered by dhruvnarayan9
0

Answer:

this is not a right answer please check your answer

Answered by vader3
0

Answer:

a = str(int(input("Enter First Number: ")))

b = str(int(input("Enter Second Number: ")))

last_a = a[-1]

last_b = b[-1]

if last_a == last_b:

   print(True)

else:

   print(False)

Explanation:

It checks the last digit of both the numbers.

Similar questions