South Point - Class XI - Computer Science. Assignment Number 14a - Python Language
1375
Arnab De
09/12/2020
Write a Python program to input a number and count the number of digits which are multiple of 3.
For example, if the number is 2368965, then the output will be 4 (as the digits 3, 6, 9, 6 in the number are multiples of 3).
n=int(input("Enter a number : "))
count=0
while(n>0):
r=n%10
if(r%3==0):
count=count+1
n=n//10
print("Total odd digit in the number is ",count)