HTML Tutorial || Networking Assignment || Computer Full Forms || Ms-Office Shortcut Keys || Ms-Office Notes || Number System Notes || Internet Assignment
JavaScript Tutorial || CSS Tutorial || Operating System Notes || History of Computer Assignment || Netwoking Notes || Computer Fundamentals Notes

C Program to Print Multiplication Table of Any Number Using For Loop


Q:- Write a C Program to Print Multiplication Table of Any Number Using For Loop ?
       Input
         #include<stdio.h>
         #include<conio.h>
         main()
   {
int num,i,t=1;
clrscr();
printf(“Enter a Number to Print Table =”);
scanf(“%d”,&num);
for(i=1;i<=10;i++)
{
t=num*i;
printf(“%d*%d=%d\n”,num,i,t);
}
getch();
   }


Output

Enter a Number to Print Table = 2
2     *     1     =     2
2     *     2     =     4
2     *     3     =     6
2     *     4     =     8
2     *     5     =     10
2     *     6     =     12
2     *     7     =     14
2     *     8     =     16
2     *     9     =     18
2     *     10   =     20

Comments