数字是否是10的整数倍

作业:数字是否是10的整数倍,如果是,计算出是10的多少倍,如果不是就输出提示!

number = int(input("Enter a number,and I'll tell you determine if the number is a multiple of 10:  "))

if number % 10 == 0:
    print("This number " + str(int(number)) + " is an integral multiple of 10!")
    print("This number is "+str(int(number/10))+" times of 10!")
else:
    print("This number " + str(number) + " is not an integral multiple of 10")

猜你喜欢

转载自www.cnblogs.com/show530/p/12388536.html
今日推荐