Answer to Question #289705 in Python for Manu

Question #289705

Write a function int solution(int A[], int that given an array A consisting of N integers, returns the sum of all integers which are multiples of 4

1
Expert's answer
2022-01-22T13:01:17-0500
def solution(A):
    sum=0
    for i in A:
        if i % 4==0:
            sum+=i
    return sum
    
A={5,5,2,8,3,88}
print(solution(A))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS