From 03547fc2f60c109ce407f9f0152715c89c76bc92 Mon Sep 17 00:00:00 2001 From: Alexandre Monjol Date: Sun, 16 Nov 2025 17:00:25 -0300 Subject: [PATCH] Add solution for Challenge 1 by ansmonjol --- .../ansmonjol/solution-template.go | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 challenge-1/submissions/ansmonjol/solution-template.go diff --git a/challenge-1/submissions/ansmonjol/solution-template.go b/challenge-1/submissions/ansmonjol/solution-template.go new file mode 100644 index 00000000..479c1774 --- /dev/null +++ b/challenge-1/submissions/ansmonjol/solution-template.go @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" +) + +func main() { + var a, b int + // Read two integers from standard input + _, err := fmt.Scanf("%d, %d", &a, &b) + if err != nil { + fmt.Println("Error reading input:", err) + return + } + + // Call the Sum function and print the result + result := Sum(a, b) + fmt.Println(result) +} + +// Sum returns the sum of a and b. +func Sum(a int, b int) int { + return a + b +}