Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: String Formatting Practice | Data Types
course content

Course Content

Introduction to GoLang

Challenge: String Formatting PracticeChallenge: String Formatting Practice

Task

Write the correct format specifiers to format the string based on the passed arguments in the Printf function.

go

index.go

Replace the blanks (___) with the correct format specifiers %s, %d, %f etc.

package main
import "fmt"

func main() {
    fmt.Printf("%c %d %s %f %t", 'm', 10, "Word", 7.99, true)
}
      

Everything was clear?

Section 2. Chapter 8
course content

Course Content

Introduction to GoLang

Challenge: String Formatting PracticeChallenge: String Formatting Practice

Task

Write the correct format specifiers to format the string based on the passed arguments in the Printf function.

go

index.go

Replace the blanks (___) with the correct format specifiers %s, %d, %f etc.

package main
import "fmt"

func main() {
    fmt.Printf("%c %d %s %f %t", 'm', 10, "Word", 7.99, true)
}
      

Everything was clear?

Section 2. Chapter 8
some-alt