Contact: aviboots(AT)netvision.net.il
40,904 questions
53,356 answers
573 users
package main import ( "fmt" ) func main() { const n1, n2, n3= 1, 7, 12 s := fmt.Sprintf("%d + %d + %d = %d", n1, n2, n3, n1 + n2 + n3) fmt.Println(s) } /* run: 1 + 7 + 12 = 20 */
package main import ( "fmt" ) func main() { s := fmt.Sprintf("Binary: %b - %b", 3, 255) fmt.Println(s) } /* run: Binary: 11 - 11111111 */