c
  1. c-program-to-generate-multiplication-table

Program to Generate Multiplication Table - (C Programs)

Example:

Enter the number whose multiplication table you want to generate: 5
Enter the number of times you want the multiplication table to be generated: 10

5 x 1 = 5
5 x 2 = 10
5 x 3 = 15
5 x 4 = 20
5 x 5 = 25
5 x 6 = 30
5 x 7 = 35
5 x 8 = 40
5 x 9 = 45
5 x 10 = 50

Output:

The program generates the multiplication table of the given number for the specified number of times.

Explanation:

The program takes the input of the number whose multiplication table is to be generated and the number of times that the table is to be generated. Using a for loop, the program generates the multiplication table of the given number by iterating through the loop and multiplying the given number by the loop variable. The loop runs for the number of times specified by the user and displays the output on the console.

Use:

This program can be used by students learning C programming to practice their programming skills and understand the concept of loops and multiplication.

Summary:

This program generates the multiplication table of a given number for the specified number of times using a for loop. It is a useful program for students learning C programming.

Published on: