Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

Commit f454c39

Browse files
subhashjain010sj5027052
authored andcommitted
Created sum_of_digits.py
Signed-off-by: Subhash Jain <steve241955jobs@gmail.com> Signed-off-by: Sanyam Jain <sj5027052@gmail.com>
1 parent 96d2fec commit f454c39

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
inp = input()
2+
s = 0
3+
for ele in inp:
4+
s += int(ele)
5+
6+
print("Sum of digits of the number " + inp + " is", s)

0 commit comments

Comments
 (0)