- Related Questions & Answers
- C Program to represent a multiplication table.
- C program to print multiplication table by using for Loop
- C++ Program to Perform Matrix Multiplication
- Java program to print a multiplication table for any number
- C++ Program to Perform Complex Number Multiplication
- C++ Program to Implement Russian Peasant Multiplication
- Kth Smallest Number in Multiplication Table in C++
- How to find and display the Multiplication Table in C#?
- C Program for Matrix Chain Multiplication
- Print multiplication table of a given number in C
- C++ program to generate random number
- C++ program to generate random alphabets
- How to Display the multiplication Table using Python?
- C++ program for multiplication of array elements
- Matrix Multiplication and Normalization in C program

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

The multiplication table is used to define a multiplication operation for any number. It is normally used to lay the foundation of elementary arithmetic operations with base ten numbers.

The multiplication table of any number is written till 10. In each row, the product of the number with 1 to 10 is displayed. An example of the multiplication table of 4 is as follows −

4 * 1 = 4 4 * 2 = 8 4 * 3 = 12 4 * 4 = 16 4 * 5 = 20 4 * 6 = 24 4 * 7 = 28 4 * 8 = 32 4 * 9 = 36 4 * 10 = 40

A program that generates the multiplication table of the given number is as follows.

#include <iostream> using namespace std; int main() { int n = 7, i; cout<<"The multiplication table for "<< n <<" is as follows:"<< endl; for (i = 1; i <= 10; i++) cout << n << " * " << i << " = " << n * i << endl; return 0; }

The multiplication table for 7 is as follows: 7 * 1 = 7 7 * 2 = 14 7 * 3 = 21 7 * 4 = 28 7 * 5 = 35 7 * 6 = 42 7 * 7 = 49 7 * 8 = 56 7 * 9 = 63 7 * 10 = 70

In the above program, a for loop is used from 1 to 10. In each iteration of the for loop, the number is multiplied with i and the product is displayed. This is demonstrated by the following code snippet.

for (i = 1; i <= 10; i++) cout << n << " * " << i << " = " << n * i <<endl;

Advertisements