Program to take number from user and print table of that number.| Using C language| C Program series 21|
👨💻Program to accept a number and print a table of that number.
Code:
//Program to take a number from user and print a table of that number.
#include<stdio.h>
main()
{
printf("Program to take a number from user and print table of that number.\n\n");
int n, i;
printf("Enter the number:");
scanf("%d",&n);
printf("\n||Table of %d||\n",n);
for(i=1;i<=10;i++)
{
printf(" %d x %d = %d\n",n,i,i*n);
}
}
Output:
Comments
Post a Comment