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
Interface embedding and calling interface methods from another package in Go (Golang)
Cannot use <variable> (type <type>) as type <new-type> error in Golang
Make Your Retirement Luxurious with These 5 Game-Changing Altcoins
Web Application to read and write JSON data in JSON File
Golang read file line by line to string
Program in Go language to Find Largest Element of an Array
Go language Best practices to follow in 2023
Golang program to print a matrix in Spiral Format
Golang program for implementation of AVL Trees
Example: ReadAll, ReadDir, and ReadFile from IO Package