Contact Learn C
Copy

Program 165:Multiplication Table

Program 165:
Case I:

#include<stdio.h>
main()
{
    int i,num,end;
    printf("Enter a number for which you want table\n");
    scanf("%d",&num);
    printf("Enter a number till where \nyou want multiplication with %d\n",num);
    scanf("%d",&end);
    printf("Multiplication table of %d is\n",num);
    for(i=1;i<=end;i++)
    {
     printf("%d x %d = %d\n",num,i,num*i);
    }
}

Case II:

#include<stdio.h>
main()
{
 int i,n,j=0,k=1,end;
 printf("Enter a number for which you want table\n");
 scanf("%d",&n);
 printf("Enter a number till where \nyou want multiplication with %d\n",n);
        scanf("%d",&end);
 while(k<=end)
 {
  i=n;
  j=j+i;
  printf("%d x %d = %d\n",i,k,j);
  k++;
 }
}
Explanation:

//Coming Soon...

Output:

Multiplication Table



1 comment:

  1. A great website with interesting and unique material what else would you need. pythagorean identites

    ReplyDelete

Donate

Download App and Learn when ever you want

Get it on PlayStore
Get it on Amazon App Store
Get it on Aptoide