C program to display Multiplication Tables within the Limit

A Set of Multiplication tables:
The first program displays set of Multiplication tables from 0 to given limit.
Second program displays tables with in upper limit and lower limit.


#include<stdio.h>
void main()
{
int n, i, j;
printf(“Enter Limit (<=5) : “);
scanf(“%d”, &n);
if(n>5)
{
printf(“Invalid input”);
}
else
{
for(i=1 ; i<=10 ; i++)
{
for(j=1 ; j<=n ; j++)
{
printf(“%d * %d = %d \t”, j, i, j*i);
}
printf(“\n”);
}
}
}

Share this