Problem 29: Multiplication

Take an integer as input and print it’s multiplication table up to 10. If user gives 5, your output should look like the following example-
5 * 1 = 5
5 * 2 = 10
5 * 3 = 15.
.
.
5 * 10 = 50

 

2,304 total views, 2 views today

Comments

comments

3 thoughts on “Problem 29: Multiplication”

  1. #include
    int main()
    {
    int n=5;
    int i=1;
    while(i<=10){
    printf("%d*%d=%d\n",n,i,n*i);
    i++;

    }
    }

  2. #include
    int main (){
    int n=5,i=1,m;
    for(i=1;i<=10;i++){
    m=(n*i);
    printf("%d * %d = %d\n",n,i,m);
    }
    return 0;

    }

  3. #include
    int main()
    {
    int x,i,j;
    scanf(“%d”,&x);
    for(i=1;i<=10;i++)
    {
    printf("%d * %d = %d\n",x,i,x*i);
    }

    return 0;
    }

Leave a Reply

Your email address will not be published.