Wednesday, May 6, 2009

PROGRAM TO PRINT MULTIPLICATION TABLE

#include
main()

{
int i,j,r,c;
printf("enter the # of rows of *table");
scanf("%d",&r);
printf("enter the # of columns of *table");
scanf("%d",&c);
printf("\t\t\t MULTIPLICATION TABLE\n");
printf("-------------------------------------------------------------------------------\n");
for(i=1;i<=r;i++)
{
for(j=1;j<=c;j++)
{
printf("%5d",i*j);
}
printf("\n\n");
}
printf("________________________________________________________________________________\n");
}

No comments:

Post a Comment