Multiplication Table

Print a multiplication table for any number.

package main

import "fmt"

func main() {
	n := 7
	fmt.Printf("Multiplication table for %d:\n", n)

	for i := 1; i <= 10; i++ {
		fmt.Printf("%d x %d = %d\n", n, i, n*i)
	}
}
▶ Open Go Playground

Copy the code above and paste to run

© 2026 ByteLearn.dev. Free courses for developers. · Privacy