fix(Checkpoints): add the mains for the exams exercises to work in the code editor

This commit is contained in:
miguel 2024-01-18 16:33:02 +00:00 committed by MSilva95
parent 04714e135a
commit 38c9ac3641
3 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,20 @@
package main
import (
"piscine"
"github.com/01-edu/z01"
)
func main() {
piscine.PrintNbrBase(125, "0123456789")
z01.PrintRune('\n')
piscine.PrintNbrBase(-125, "01")
z01.PrintRune('\n')
piscine.PrintNbrBase(125, "0123456789ABCDEF")
z01.PrintRune('\n')
piscine.PrintNbrBase(-125, "choumi")
z01.PrintRune('\n')
piscine.PrintNbrBase(125, "aa")
z01.PrintRune('\n')
}

View File

@ -0,0 +1,10 @@
package main
import (
"fmt"
"piscine"
)
func main() {
fmt.Printf("%#v\n", piscine.SplitWhiteSpaces("Hello how are you?"))
}

14
subjects/swap/main.go Normal file
View File

@ -0,0 +1,14 @@
package main
import (
"fmt"
"piscine"
)
func main() {
a := 0
b := 1
piscine.Swap(&a, &b)
fmt.Println(a)
fmt.Println(b)
}