GO Program to Generate Multiplication Table
Example to generate the multiplication table of a number (entered by the user) using for loop in a while loop style.
Example
package main
import "fmt"
func main(){
var n int
fmt.Print("Enter any Integer Number : ")
fmt.Scan(&n)
i:=1
/* For loop as a Go's While */
for {
if(i>10){
break;
}
fmt.Println(n," X ",i," = ",n*i)
i++
}
}
Most Helpful This Week
Golang program for implementation of Knuth–Morris–Pratt (KMP) Algorithm
Example of Fscan, Fscanf, and Fscanln from FMT Package
Golang program for implementation of Quick Sort
Golang program for implementation of Median of Medians
How do you handle HTTP client server alerting in Go?
Golang panic recover example