Skip to content

Commit

Permalink
golang hello for
Browse files Browse the repository at this point in the history
  • Loading branch information
nahyunsama committed Jul 7, 2024
1 parent 27be4c8 commit 3815972
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
9 changes: 9 additions & 0 deletions golang/tuckers_go/08_for/for_00/for-00.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package main

import "fmt"

func main() {
for i := 0; i < 10; i++ {
fmt.Print(i, ", ")
}
}
15 changes: 15 additions & 0 deletions golang/tuckers_go/08_for/for_01/for-01.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package main

import (
"fmt"
"time"
)

func main() {
i := 1
for {
time.Sleep(time.Second)
fmt.Println(i)
i++
}
}

0 comments on commit 3815972

Please sign in to comment.