Skip to content

Commit df7b450

Browse files
authored
Add solution for Challenge 1 by Tonyblaise (#1572)
Auto-merged after 2 days with all checks passing. PR: #1572 Author: @Tonyblaise
1 parent 9d79f7d commit df7b450

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package main
2+
3+
import "fmt"
4+
5+
func main() {
6+
var a, b int
7+
8+
_, err := fmt.Scanf("%d,%d", &a, &b)
9+
if err != nil {
10+
fmt.Println("Error reading input", err)
11+
return
12+
}
13+
14+
result := Sum(a, b)
15+
fmt.Println(result)
16+
}
17+
18+
// Sum returns the sum of a and b.
19+
func Sum(a int, b int) int {
20+
return a + b
21+
}

0 commit comments

Comments
 (0)