n = input()
S = 0
while n != '%':
if n.isdigit(): s += int(n)
if S:
print(f'{S=}')
else:
print('No digits')
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
n = input()
S = 0
while n != '%':
if n.isdigit():
s += int(n)
n = input()
if S:
print(f'{S=}')
else:
print('No digits')