Friday, September 23, 2022

Lyc
Multiplication Table [C]

Hey there coders welcome to cyber assassin's. I am Lyc from cyber assassin's. The post is about making a simple multiplication table using c programing language.


#Here is the code:

#include <stdio.h>

int main()
{
    int a, b, c, d, e, f, g, h, i, j, k;
    b = 1;
    c = 2;
    d = 3;
    e = 4;
    f = 5;
    g = 6;
    h = 7;
    i = 8;
    j = 9;
    k = 10;

    printf("Enter the number you want multiplication table of:\n");
    scanf("%d", &a);
    
    printf("Here is the multiplication table of %d\n",a);
    printf("%dx%d=%d\n",a,b,a*b);
    printf("%dx%d=%d\n",a,c,a*c);
    printf("%dx%d=%d\n",a,d,a*d);
    printf("%dx%d=%d\n",a,e,a*e);
    printf("%dx%d=%d\n",a,f,a*f);
    printf("%dx%d=%d\n",a,g,a*g);
    printf("%dx%d=%d\n",a,h,a*h);
    printf("%dx%d=%d\n",a,i,a*i);
    printf("%dx%d=%d\n",a,j,a*j);
    printf("%dx%d=%d\n",a,k,a*k);

    return 0;
}

It looks a little bit clear


#You may follow this one also if you want to save your time...

#include <stdio.h>

int main()
{
    int a, b=1, c=2, d=3, e=4, f=5, g=6, h=7, i=8, j=9, k=10;
    
    printf("Enter the number you want multiplication table of:\n");
    scanf("%d", &a);
    printf("The multiplication table of %d\n",a);
    printf("%dx%d=%d\n",a,b,a*b);
    printf("%dx%d=%d\n",a,c,a*c);
    printf("%dx%d=%d\n",a,d,a*d);
    printf("%dx%d=%d\n",a,e,a*e);
    printf("%dx%d=%d\n",a,f,a*f);
    printf("%dx%d=%d\n",a,g,a*g);
    printf("%dx%d=%d\n",a,h,a*h);
    printf("%dx%d=%d\n",a,i,a*i);
    printf("%dx%d=%d\n",a,j,a*j);
    printf("%dx%d=%d\n",a,k,a*k);
    return 0;
}

That's how you can make a simple multiplication table with C programing language of any number using these codes.


Thanks for visiting........


0 comments:

Post a Comment

Contact Us

Phone :

+8801716815647
+8801996204467
+8801520731186

Email :

susmoy1025@gmail.com
dishantanjim@gmail.com
sadmansakib7494@gmail.com