Wednesday, 21 September 2011

How to print table in C

Program to print table of any given no.




#include<stdio.h>
#include<conio.h>
void main()
{
int a,i=0,s=1;
clrscr();
printf("Enter the number: ");
scanf("%d",&a);
for(i=1;i<=10;i++)
{
s=a*i;
printf(" %d ",s);
printf("\n");
}
getch();
}

No comments:

Post a Comment