Kodewick
Start learning →
Starter←→0 / 70

Croissant price

#006StarterOutput2 min

The bakery sells croissants for 3.8, but the price card should show two decimal places. Use fmt.Printf with %.2f to show Croissant: 3.80, the price coming from the variable price.

Should show
Croissant: 3.80
main.go
package main

import "fmt"

func main() {
	price := 3.8
	// your code here: fmt.Printf with %.2f for the price, then a newline
}
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.