diff --git a/subjects/go-reloaded/go-reloaded.en.md b/subjects/go-reloaded/go-reloaded.en.md index 7ad789d4..dce835cc 100644 --- a/subjects/go-reloaded/go-reloaded.en.md +++ b/subjects/go-reloaded/go-reloaded.en.md @@ -56,32 +56,14 @@ import ( ) func main() { - s := "12345" - s2 := "0000000012345" - s3 := "012 345" - s4 := "Hello World!" - s5 := "+1234" - s6 := "-1234" - s7 := "++1234" - s8 := "--1234" - - n := student.Atoi(s) - n2 := student.Atoi(s2) - n3 := student.Atoi(s3) - n4 := student.Atoi(s4) - n5 := student.Atoi(s5) - n6 := student.Atoi(s6) - n7 := student.Atoi(s7) - n8 := student.Atoi(s8) - - fmt.Println(n) - fmt.Println(n2) - fmt.Println(n3) - fmt.Println(n4) - fmt.Println(n5) - fmt.Println(n6) - fmt.Println(n7) - fmt.Println(n8) + fmt.Println(student.Atoi("12345")) + fmt.Println(student.Atoi("0000000012345")) + fmt.Println(student.Atoi("012 345")) + fmt.Println(student.Atoi("Hello World!")) + fmt.Println(student.Atoi("+1234")) + fmt.Println(student.Atoi("-1234")) + fmt.Println(student.Atoi("++1234")) + fmt.Println(student.Atoi("--1234")) } ``` diff --git a/subjects/trimatoi.en.md b/subjects/trimatoi.en.md index af0f39a8..d18a26f8 100644 --- a/subjects/trimatoi.en.md +++ b/subjects/trimatoi.en.md @@ -31,29 +31,13 @@ import ( ) func main() { - s := "12345" - s2 := "str123ing45" - s3 := "012 345" - s4 := "Hello World!" - s5 := "sd+x1fa2W3s4" - s6 := "sd-x1fa2W3s4" - s7 := "sdx1-fa2W3s4" - - n := piscine.TrimAtoi(s) - n2 := piscine.TrimAtoi(s2) - n3 := piscine.TrimAtoi(s3) - n4 := piscine.TrimAtoi(s4) - n5 := piscine.TrimAtoi(s5) - n6 := piscine.TrimAtoi(s6) - n7 := piscine.TrimAtoi(s7) - - fmt.Println(n) - fmt.Println(n2) - fmt.Println(n3) - fmt.Println(n4) - fmt.Println(n5) - fmt.Println(n6) - fmt.Println(n7) + fmt.Println(piscine.TrimAtoi("12345")) + fmt.Println(piscine.TrimAtoi("str123ing45")) + fmt.Println(piscine.TrimAtoi("012 345")) + fmt.Println(piscine.TrimAtoi("Hello World!")) + fmt.Println(piscine.TrimAtoi("sd+x1fa2W3s4")) + fmt.Println(piscine.TrimAtoi("sd-x1fa2W3s4")) + fmt.Println(piscine.TrimAtoi("sdx1-fa2W3s4")) } ```