3/07/2016

C Program To Print Multiplication Table Using For Loop

Problem :- Write A C Program To Print Multiplication Table Using For Loop .

Logic :- Take a input from user then use an any loop and start with condition =1;condition <=10; and increase by one each time ,and multiply input with condition and print .

Try Yourself  C++ Program To Print Table Of Any Given Number

Solution :-


#include<stdio.h>

int main()
{
    int i,a,n;
    printf("Enter The Number That You Want To Print Table \n");
    scanf("%d",&n);

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

    return 0;
}

Output:-

C Program To Print Multiplication Table Using For Loop

Ghanendra Yadav

Ghanendra Yadav

Hello, I Am Ghanendra Yadav Owner of This Blog, I am professional Blogger and Programmer. I Love Programming, Logo Making, And Banner Designing. My Highest Qualification is MCA From NIT Warangal. You Can Find Me On Social Media Through Below Link And If You Have Any Query Related To Programming And Other Subject Comment Below or You Can Mail Me I Will Try To Answer Within 24 Hours Email:- yghanendra@student.nitw.ac.in

Find me on Social Media

Facebook | Twitter | Google+ | RSS Feed

No comments:

Post a Comment