Respuesta :
Answer:
Explanation:
Let's code it using python. We can take care of the negative number by placing an absolute function at the end. Basically the decimal part is calculated by subtracting the integer part from the original input number
def decimal_print(number):
int_part = int(number)
decimal_part = number - int_part
return abs(decimal_part)
Answer:
x=float(input("Enter a number: "))
sub=(x-int(x))
print(sub)
Explanation:
Got it right