Ответ:
Объяснение:
a = int(input('a = '))
b = int(input('b = '))
c = int(input('c = '))
d = int(input('d = '))
summ = 0
if a % 3 == 0:
summ = summ + a
if b % 3 == 0:
summ = summ + b
if c % 3 == 0:
summ = summ + c
if d % 3 == 0:
summ = summ + d
print(summ)
n=4
s=0
for i in range(n):
x=int(input())
if x%3==0:
s+=x
print(s)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
Объяснение:
a = int(input('a = '))
b = int(input('b = '))
c = int(input('c = '))
d = int(input('d = '))
summ = 0
if a % 3 == 0:
summ = summ + a
if b % 3 == 0:
summ = summ + b
if c % 3 == 0:
summ = summ + c
if d % 3 == 0:
summ = summ + d
print(summ)
Ответ:
n=4
s=0
for i in range(n):
x=int(input())
if x%3==0:
s+=x
print(s)