하나의 자연수를 입력 받아 각 자릿수의 합을 계산하는 프로그램
result = 0 for i in range(4): a = T %10 T = T // 10 result = result + a print(result)
input
6789
output
30