7. Display
the multiplication tables up to the number N.
#include
<stdio.h>
void main()
{
int j,i,n;
clrscr();
printf("Input
upto the table number starting from 1 : ");
scanf("%d",&n);
printf("Multiplication
table from 1 to %d \n\n",n);
for(j=1;j<=10;j++)
{
for(i=1;i<=n;i++)
{
if (i<=n-1)
printf("%dx%d = %d ",i,j,j*i);
else
printf("%dx%d =
%d\n",i,j,j*i);
printf("\n");
}
getch();
}
No comments:
Post a Comment