How do I determine the harshad value of a number with a function?

前端 未结 0 1374
情话喂你
情话喂你 2020-12-06 03:27

So far I have:

n=int(input("Enter a number:"))
tot=0
while(n>0):
        dig=n%10
        tot=tot+dig
        n=n//10
        print("sum is&         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题