C Programming

Wap to calculate and display the multiplication table using a nested loop.

#include<stdio.h>
#include<conio.h>
void main()
{
int a,i,n1,n2,m;
printf("Enter the first and last value of the series\n");
scanf("%d,%d",&n1,&n2);
for(a=n1;a<=n2;a++)
    {
    printf("\n The multiplication table is");
    for(i=1;i<=10;i++)
    {
        m=a*i;
        printf("\n%d*%d=%d",a,i,m);
    }
    
}
getch();
}
image_pdfOpen as Pdfimage_printPrint

Leave a Reply

Your email address will not be published. Required fields are marked *