Thursday, 16 November 2017

C Program to Find & Display Multiplication table


Code:

#include   stdio.h

int main()
{
    int number, i = 1;

    printf(" Enter the Number:");
    scanf("%d", &number);
    printf("Multiplication table of %d:\n ", number);
    printf("--------------------------\n");
    while (i <= 10)
    {
        printf(" %d x %d = %d \n ", number, i, number * i);
        i++;
    }
    return 0;
}

Output:

Enter the Number:6
Multiplication table of 6:
--------------------------
 6 x 1 = 6
 6 x 2 = 12
 6 x 3 = 18
 6 x 4 = 24
 6 x 5 = 30
 6 x 6 = 36
 6 x 7 = 42
 6 x 8 = 48
 6 x 9 = 54
 6 x 10 = 60


More C Programs:













100+ Best Home Decoration Ideas For Christmas Day 2019 To Make Home Beautiful

Best gifts for Christmas Day | Greeting cards for Christmas Day | Gift your children a new gift on Christmas day This Christmas d...