Electro4u 28 Dec 2022 0 views 0 comments C Programming

Multiplication table of a given number

Multiplication Table of a Given Number in C

A multiplication table of a given number is a table that shows the results of multiplying the given number by other numbers, typically from 1 to 10 or 12.

For example, if we are given the number 5, the multiplication table of 5 would show the results of multiplying 5 by each number from 1 to 10 or 12, as shown below:

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

The multiplication table of a given number can be useful for learning and practicing multiplication, as well as for solving math problems that involve multiplication. It is often used in elementary and middle school education to teach multiplication.

 

write a c program to Multiplication table of a given number

#include<stdio.h>
int main() {
 int num, i = 1;
 printf("\n Enter any Number:");
 scanf("%d", &num);
 printf("Multiplication table of %d: \n", num);
 while (i <= 10) {
 printf("\n %d x %d = %d", num, i, num * i);
 i++;
 }
 return 0;
}
 

Output:

 Enter any Number:5
 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

Explanation:

We need to multiply the given number (i.e. the number for which we want the multiplication table) with value of 'i' which increments from 1 to 10.

0 Comments

No comments yet, Be the first to comment.

Post a Comment

Please sign in to post a comment.

Related Posts

Bit wise operators Assignment

Bitwise Operators practical assignment: Take runtime input, bit-level manipulation, and different data units r...

AG Anvesh G 27 Sep 2026
Understanding Float and Double Binary Representation in C

Understanding Float and Double Binary Representation in CIntroduction:When we store decimal numbers such as 10...

AG Anvesh G 31 May 2026
Topic-wise C Programming Interview Questions

C Programming Interview Questions – Topic Wise1. IntroductionC programming is one of the most important langu...

AG Anvesh G 30 May 2026