//Program to print a multiplication table
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int a=0,n,i;
printf("\n\nEnter the no for multiplication table\n\n");
scanf("%d",&n);
for(i=1;i<=10;i=i+1)
{
a=i*n;
printf("\n\n%d*%d=%d\n\n",i,n,a);
}
getch();
}
-----------------------------------------------------------------------
Output
Enter the no for multiplication table
2
1*2=2
2*2=4
3*2=6
.
.
.
10*2=20
=========================================
No comments:
Post a Comment