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
Program in Golang to print Pyramid of Numbers
GO Program to Check Whether a Number is Even or Odd
Example to use various String Functions in Go Language
Program in Go language to Find Largest Element of an Array
GO Program to Swap Number Without Using Temporary Variables
GO Program to print full Pyramid using *