Язык не указан, на Python
def get_int_seq():
while True:
k = int(input())
if k == 0: break;
yield k
return
s = sum([x for x in get_int_seq() if x mod 10 == 6])
print(s)
Язык не указан, на Python
def get_int_seq():
while True:
k = int(input())
if k == 0: break;
yield k
return
s = sum([x for x in get_int_seq() if x mod 10 == 6])
print(s)