Table of a given number

Algorithm

Input   Any integer number  
Output  Its table from 1 to 10  
Complexity O(1)  
  
Table (num)  
1 for r=1 to 10  
2     print ”num*r”  
3     r=r+1  

Algorithm Description

Initialize the value of r from 1 and increment it up to 10 to print the table of number by multiplying it with the number.

C Code

//Program to print the table of a number

#include< stdio.h>
#include< conio.h>
int main()
{
	int num,r;
	printf("Enter a number ");
	scanf("%d",&num);
	printf("\nThe Table Of %d is\n",num);
	for(r=1;r <=10;r++)
	{
		printf("\n %d * %d = %d",num,r,num*r);
	}
}