Added inverse-counting exercise

This commit is contained in:
raul 2024-03-04 07:54:48 +00:00
parent 9e978f0bcf
commit 8be6890727
3 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,20 @@
package main
import (
"fmt"
"time"
)
func upwards() {
for i := 0; i < 100; i++ {
fmt.Println(i)
time.Sleep(time.Millisecond * 75)
}
}
func downwards() {
for i := 100; i >= 0; i-- {
fmt.Println(i)
time.Sleep(time.Millisecond * 75)
}
}

3
inverse-counting/go.mod Normal file
View File

@ -0,0 +1,3 @@
module inverse-counting
go 1.22.0

6
inverse-counting/main.go Normal file
View File

@ -0,0 +1,6 @@
package main
func main() {
go upwards()
downwards()
}