Pendant la boucle à Golang
n := 0
x := 42
for n != x {
n := guess()
}
Harendra
n := 0
x := 42
for n != x {
n := guess()
}
// Program to print numbers between 1 and 5
package main
import ("fmt")
func main() {
number := 1
for number <= 5 {
fmt.Println(number)
number++
}
}
// Program to print number from 1 to 5
package main
import "fmt"
func main(){
number := 1
// loop that runs infinitely
for {
// condition to terminate the loop
if number > 5 {
break;
}
fmt.Printf("%d\n", number);
number ++
}
}
for {
fmt.Println("Infinite Loop 1")
time.Sleep(time.Second)
}