Walk Lightly on this PLANET and yet leave such a FOOTPRINT that cannot be erased for thousands of Years..!!!
Visit Codstech for Cyber Security related Posts !

Visitors

Thursday, February 10, 2011

C12. Print a multiplication table


Back to Home   &  C


//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
=========================================

Back to Home   &  C

No comments: