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