Online visitors

People learning around the world

Online

—

Visitors exploring W3Schools

Online visitors by country Circles show approximate country locations. The country list provides the visitor counts.

Circles represent countries, not exact visitor locations.

Country

Online

Loading country activity…

    C Program to Display The Multiplication Table of a Given Number

    C Programming Examples


    This C program is used to display the multiplication table of a given number.

    Program:

    #include <stdio.h>
    
    int main() {
        int num, i = 1;
        printf("
        Enter any Number:");
        scanf("%d", &num);
        printf("Multiplication table of %d: ", num);
        
        while (i <= 10) {
            printf("
            %d x %d = %d", num, i, num * i);
            i++;
        }
        return 0;
    }

    Program Output:

    Enter any Number:5
    
    5 x 1 = 5
    
    5 x 2 = 10
    
    5 x 3 = 15
    
    5 x 4 = 20
    
    5 x 5 = 25
    
    5 x 6 = 30
    
    5 x 7 = 35
    
    5 x 8 = 40
    
    5 x 9 = 45
    
    5 x 10 = 50

    Explanation:

    We need to multiply the given number (i.e. the number for which we want the multiplication table)
    with value of 'i' which increments from 1 to 10.



    Found This Page Useful? Share It!
    Get the Latest Tutorials and Updates
    Join us on Telegram

    Notifications

    Updates are enabled for this browser.

    Receive new tutorials, articles and learning resources. You can turn updates off anytime.