Q:

Write a C Program to generate table of a given input number

0

Write a C Program to generate table of a given input number. Here’s simple C Program to generate table of a given input number in C Programming Language.

Enter any integer number as input of which you want multiplication table. After that we use for loop from one to ten to generate multiplication of that number.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Below is the source code for C Program to generate table of a given input number which is successfully compiled and run on Windows System to produce desired output as shown below :

SOURCE CODE : :

/*  C Program to generate table of a given input number  */

#include<stdio.h>
#include<conio.h>

int main()
{
  int num,result,i=1;
  printf("Enter any number to generate the table : ");
  scanf("%d",&num);
  printf("\nThe table of %d is given below :: \n",num);
  while(i<=10)
  {
  result=num*i;
  printf(" %d * %d = %d\n",num,i,result);
  i++;
  }
return 0;
}

 

OUTPUT : :

 

/*  C Program to generate table of a given input number  */

Enter any number to generate the table : 7

The table of 7 is given below ::
 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
 

Above is the source code for C Program to generate table of a given input number which is successfully compiled and run on Windows System.The Output of the program is shown above .

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C Basic Solved Programs – C Programming

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Write a C Program to check triangle is a equilater... >>
<< Write a C Program to find out the sum of first n n...