Antonio,
The first example has three format verbs and just two values. That is
usually wrong.
Use "go vet" to be warned of such errors.
Sam's answer explains how you can print two values three ways using
indexing "[1]" and "[2]".
Your new example has two format verbs and two values. This is
Don't work, print 2 time the same variable (coin).
The solution is :
fmt.Printf("%-15.2f %5.2f\n", coin, piggybank)
Now add spaces and format the float variable coin (-15v + 5.2f)
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To