Browse Source

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

pull/2387/head
miguel 10 months ago committed by MSilva95
parent
commit
38c9ac3641
  1. 20
      subjects/printnbrbase/main.go
  2. 10
      subjects/splitwhitespaces/main.go
  3. 14
      subjects/swap/main.go

20
subjects/printnbrbase/main.go

@ -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')
}

10
subjects/splitwhitespaces/main.go

@ -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

@ -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)
}
Loading…
Cancel
Save