Tutorial Gateway

  • C
  • C#
  • Java
  • Python
  • SQL
  • MySQL
  • Js
  • BI Tools
    • Informatica
    • Talend
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • R Tutorial
    • Alteryx
    • QlikView
  • More
    • C Programs
    • C++ Programs
    • Go Programs
    • Python Programs
    • Java Programs

Go Program to Print Multiplication Table

by suresh

This Go program uses nested for loop to print multiplication tables of 9 and 10. The outer for loop to iterate values from 9 to 10, and the inner for loop to iterate from 1 to 20. If you want the multiplication table to display upto 20, change the nested for loop condition to j <= 20.

package main

import "fmt"

func main() {

    var i, j int

    fmt.Println("\nMultiplication Table of 9 and 10 are = ")
    for i = 9; i <= 10; i++ {
        for j = 1; j <= 10; j++ {
            fmt.Println(i, " * ", j, " = ", i*j)
        }
        fmt.Println("=======")
    }
}
Go Program to Print Multiplication Table 1

Golang program to Print Multiplication Table

This Golang program allows entering any number less than 10. Next, it prints the multiplication tables from that number to 10.

package main

import "fmt"

func main() {

    var i, j int

    fmt.Print("\nEnter the Number Less than or Equal to 10 = ")
    fmt.Scanln(&i)

    fmt.Println("\nMultiplication Tables upto 10 are = ")
    for i <= 10 {
        for j = 1; j <= 10; j++ {
            fmt.Println(i, " * ", j, " = ", i*j)
        }
        i++
        fmt.Println("=======")
    }
}
Golang Program to Print Multiplication Table 2

Placed Under: Go Examples

  • Golang Hello World Program
  • Go Add Two Number
  • Go Compound Interest
  • Go Count Digits in a Number
  • Go Cube of a Number
  • Go Even or Odd
  • Go Largest of Three Numbers
  • Go Reverse Natural Numbers
  • Go Multiplication Table
  • Go Number divisible by 5 and 11
  • Go Positive or Negative
  • Go Power of a Number
  • Go Print Natural Numbers
  • Go Profit or Loss
  • Go Print 1 to 100 without loop
  • Go Program to Print 1 to 100
  • Go Product of Digits in a Number
  • Go Palindrome Number Program
  • Go Print Even Numbers
  • Go Print Odd Numbers
  • Go Factors of a Number
  • Go Perfect Number
  • Go Prime Number
  • Go Reverse a Number
  • Go Simple Interest
  • Go Square of a Number
  • Go Square root of a Number
  • Go Sum of Digits in a Number
  • Go Sum & Avg of Natural Nums
  • Go Sum of Even Numbers
  • Go Sum of Odd Numbers
  • Go Sum of Even and Odd
  • Go Sphere Vol & Surface Area
  • Go Cylinder Vol & Surface Area
  • Go Cuboid Vol & Surface Area
  • Go Cube Volume & Surface Area
  • Go Cone Volume & Surface Area

Copyright © 2021 · All Rights Reserved by Suresh

About Us | Contact Us | Privacy Policy