Table of value n

Program Description

This program prints the table of the given value n from n * 1 = n to n * 10 = 10n.

Program
/***********************************
*   Table of value n
*	
*	code.cheraus.com
*
***********************************/

#include<stdio.h>

int main()
{
   int t,i;
   printf("\nEnter the value : ");
   scanf("%d",&t);
  
   for(i=1;i<=10;i++)
    printf("\n%d * %d = %d",t,i,t*i);

   return 0;
}

Output
Test Case 1:

Enter the value : 5

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

Comments
comments powered by Disqus