Section6.60
This commit is contained in:
@@ -11,9 +11,9 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// INFINITE LOOP
|
// INFINITE LOOP
|
||||||
sum := 0
|
/* sum := 0
|
||||||
for {
|
for {
|
||||||
sum++
|
sum++
|
||||||
}
|
}
|
||||||
fmt.Println(sum)
|
fmt.Println(sum) */
|
||||||
}
|
}
|
||||||
|
|||||||
12
Section6/59.go
Normal file
12
Section6/59.go
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
for i := 0; i < 10; i++ {
|
||||||
|
if i%2 != 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
fmt.Println(i)
|
||||||
|
}
|
||||||
|
}
|
||||||
18
Section6/60.go
Normal file
18
Section6/60.go
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
count := 0
|
||||||
|
|
||||||
|
for i := 0; true; i++ {
|
||||||
|
if i%13 == 0 {
|
||||||
|
fmt.Printf("%d is divisible by 13 \n", i)
|
||||||
|
count++
|
||||||
|
}
|
||||||
|
if count == 10 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fmt.Println("Your 10 numbers divisible by 13")
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user