write a program to find the sum of all numbers which are divisible by 3 in a tuple.
Answers
Answered by
0
Answer:
A number is divisible by 3, if the sum of its all digits is a multiple of 3 or divisibility by 3. Sum of all the digits of 54 = 5 + 4 = 9, which is divisible by 3. Hence, 54 is divisible by 3. Sum of all the digits of 73 = 7 + 3 = 10, which is not divisible by 3.
pl make me brainlist pl
Answered by
2
Answer:
sum = 0
for i in tuple:
if i % 3 == 0:
sum += i;
print(sum);
Explanation:
I don't know in which programming language you want the answer, but I guess Python.
Please mark me Brainliest if you are satisfied!
Similar questions
Biology,
11 hours ago
CBSE BOARD X,
11 hours ago
Math,
11 hours ago
English,
21 hours ago
Math,
8 months ago