Multiplication table in C

I want to print bellow example in C language. How can i do it?

Enter the number : 10

1* 10=10
2* 10=20
3* 10=30
4* 10=40
5* 10=50


12* 10=120

1 Like
#include <stdio.h>
#include <stdlib.h>

int main()
{
    int x;
    int number = 1;
    printf("Enter the Number : ");
    scanf("%d",&x);


    repeat:
        printf("%d x %d = %d\n",number,x,x*number);
        number++;

        if(number<=12)
            goto repeat;


    return 0;
}
2 Likes