Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Practicing For Loop | Control Structures
course content

Зміст курсу

Introduction to GoLang

Challenge: Practicing For LoopChallenge: Practicing For Loop

Task

Modify the code to display numbers from 10 to 1, one per line. Replace the placeholders (___) with the correct symbols or expressions.

go

index.go

Complete the code so that it prints numbers from 10 to 1 line by line. Replace the blanks (___) with appropriate symbols or expressions.

package main
import "fmt"

func main() {
    for i := 10; i > 0; i-- {
        fmt.Println(i)
    }
}
      

Все було зрозуміло?

Секція 3. Розділ 8
course content

Зміст курсу

Introduction to GoLang

Challenge: Practicing For LoopChallenge: Practicing For Loop

Task

Modify the code to display numbers from 10 to 1, one per line. Replace the placeholders (___) with the correct symbols or expressions.

go

index.go

Complete the code so that it prints numbers from 10 to 1 line by line. Replace the blanks (___) with appropriate symbols or expressions.

package main
import "fmt"

func main() {
    for i := 10; i > 0; i-- {
        fmt.Println(i)
    }
}
      

Все було зрозуміло?

Секція 3. Розділ 8
some-alt