Print Multiplication Table

C Program To Print Multiplication Table using For Loop

#include<stdio.h>
 
int main()
{
	int num, uptoNum, count;

        # \n is used for new line
        # \t is used for tab space, which generally is 2/4/8 space character

	printf("\nProvide Table Number : \t");

        # take the input in num variable.
	scanf("%d", &num);

	printf("\nStarting from 1 Multiply upto : \t");

        # take the input in uptoNum variable
	scanf("%d", &uptoNum);

        # Get the magic rolling
	for(count = 1; count <= uptoNum; count++) {

                # Let's do multiplication
		printf("%d X %d = %d\n", num, count, (num*count));

	}

	return 0;
}

C Program To Display Multiplication Table using While Loop

#include<stdio.h>
 
int main()
{
	int num, uptoNum, count = 1;

        # \n is used for new line
        # \t is used for tab space, which generally is 2/4/8 space character

	printf("\nProvide Table Number : \t");

        # take the input in num variable.
	scanf("%d", &num);

	printf("\nStarting from 1 Multiply upto : \t");

        # take the input in uptoNum variable
	scanf("%d", &uptoNum);

        # Get the magic rolling
	while(count <= uptoNum) {

                # Let's do multiplication
		printf("%d X %d = %d\n", num, count, (num*count));

                count++;

	}

	return 0;
}

Let me know, if you have any question regarding multiplication table, Ask them in Query section tab .


Loading ...

Related Results :

  1. Print Multiplication Table
Note :
  • Related Posts are generally User Blog posts.
  • or Other tutorials from other networks of w3clan.com.
  • Any registered user can create related posts based on search term tags.

About the Author