Q:

C Program To Print Multiplication Table Using For Loop

belongs to collection: Loops C Programs for Practice

0

 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 .

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#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:

Enter The Number That You Want To Print Table

10

10 * 1=10

10 * 2=20

10 * 3=30

10 * 4=40

10 * 5=50

10 * 6=60

10 * 7=70

10 * 8=80

10 * 9=90

10 * 10=100

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C Program to Display Fibonacci Series Using While ... >>
<< C Program to Find Sum of Natural Numbers Using Whi...