Code The Multiplication Table Using C Language

Hello Friends, In This Blog We Are Going To See How To Code A Multiplication Table Of An Integer Using C Language.


In this program our first Basic Aim Is to get the Multiplication Table Upto { A * 10 } where A is an integer.
Let for an example if we want the multiplication table of 8;
then according to our first Aim we will get an output of our multiplication table ranging from
8 * 1 = 8 to 8 * 10 = 80


Further in this program, our next Aim Is to get the multiplication table of that particular integer (i.e integer A in this Case) till Our Desired Limit.
According to our this Aim and according to our example as we have selected the integer 8;
If we wish to get the Multiplication Table Of 8 till 15 then our this aim will be satisfactorily used to get our desired output
i.e the Multiplication Table will now range from 8 * 1 = 8 to 8 * 15 = 120


Come-On Friends Let's Code...

#include<stdio.h>      
#include<conio.h>

  int main()
{
 int i,n,last;
 clrscr();

        printf("Enter An Integer : ");
 scanf("%d",&n);
 printf("Multiplication Table For %d is \n", n);

//Code for our first Aim starts...

        for(i=1; i<=10;i++)
        {
              printf("%d * %d = %d \n",n,i,n*i);
        }

//Recusive for loop runs for the value of i ranging from 1 to 10

       printf("\n Enter the last range till which you want %d's table : ",n);
       scanf("%d",&last);

//Code for our second Aim starts...

      for(i=1; i<=last;i++)
      {
               printf("%d * %d = %d \n", n,i,n*i);
      }

// Recusive for loop runs for the value of i ranging from 1 to Our Desired Last Limit
 
     getch();
     return 0;
}




Thank You..!!
: )
JAI HIND...

Comments