SUM!

Write a program to sum of digits of given integer number.

IN

1
2

OUT

3

IN

50
23

OUT

73

IN

20
20

OUT

40

IN

70
21

OUT

91

IN

22
40

OUT

62
Login to submit solution


2 symbols golfscript
Sat Nov 5 19:16:40 2016 Sait2000
~+
3 symbols pyth
Sat Nov 5 17:27:42 2016 Sait2000
s.Q
9 symbols perl
Sat Nov 5 19:23:16 2016 k-mx
#!/usr/bin/perl -pn
$_+=<>
40 symbols python3
Sun Jan 8 02:39:22 2017 vockyX
a=int(input())
b=int(input())
print(a+b)
60 symbols perl
Sat Nov 5 08:45:28 2016 RayhanYulanda
#! usr/bin/perl
$a = <>; $b = <>;
$sum = $a+$b;
print "$sum";
60 symbols perl
Sat Nov 5 08:49:29 2016 RayhanYulanda
#! usr/bin/perl
$a = <>; $b = <>;
$sum = $a+$b;
print "$sum";

View all solutions