Write a program to print the absolute difference between the two given numbers. (Absolute difference is the difference without the negative sign)
print ('Enter first number: ')
first = input()
print ('Enter second number: ')
second = input()
print ('Absolute difference is: ')
if (int(first) - int(second)) > 0:
print(int(first)-int(second))
else:
print(int(second) - int(first))
Comments
Leave a comment