Q.) W.A.P to print table of any number using for loop ?
#include<stdio.h>
#include<conio.h>
int main()
{
int n,i,t;
printf("enter the number :\n");
scanf("%d",&n);
for(i = 1; i<=n+1; i++)
{
t = i*n;
printf("%d\n",t);
}
getch();
}
Output
enter the number :
9 /* say n = 9 */.
9
18
27
36
45
54
63
72
81
90
function to hold the screen and show the output on the screen.