From 0aefd2c38dfd8e3baf342abb35e5cf856ea448a9 Mon Sep 17 00:00:00 2001 From: Jesus Roberto Courech Gomez Date: Sat, 9 Aug 2025 19:16:53 -0600 Subject: [PATCH 1/2] Add solution for Challenge 1 by betosmith2000 --- .../betosmith2000/solution-template.go | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 challenge-1/submissions/betosmith2000/solution-template.go diff --git a/challenge-1/submissions/betosmith2000/solution-template.go b/challenge-1/submissions/betosmith2000/solution-template.go new file mode 100644 index 00000000..694a7df8 --- /dev/null +++ b/challenge-1/submissions/betosmith2000/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, b int) int { + return a + b; +} From 5bb73093f512d6ced5aaa42c83543980d3be5671 Mon Sep 17 00:00:00 2001 From: Jesus Roberto Courech Gomez Date: Sun, 10 Aug 2025 07:39:36 -0600 Subject: [PATCH 2/2] Add solution for Challenge 2 by betosmith2000 --- .../betosmith2000/solution-template.go | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 challenge-2/submissions/betosmith2000/solution-template.go diff --git a/challenge-2/submissions/betosmith2000/solution-template.go b/challenge-2/submissions/betosmith2000/solution-template.go new file mode 100644 index 00000000..03ff4f8a --- /dev/null +++ b/challenge-2/submissions/betosmith2000/solution-template.go @@ -0,0 +1,32 @@ +package main + +import ( + "bufio" + "fmt" + "os" +) + +func main() { + // Read input from standard input + scanner := bufio.NewScanner(os.Stdin) + if scanner.Scan() { + input := scanner.Text() + + // Call the ReverseString function + output := ReverseString(input) + + // Print the result + fmt.Println(output) + } +} + +// ReverseString returns the reversed string of s. +func ReverseString(s string) string { + runes := []rune(s) + t := len(runes) + + for i:= 0; i < t/2; i++ { + runes[i], runes[t-1-i] = runes[t-1-i], runes[i] + } + return string(runes) +}