UncleCoder.com

UncleCoder.com

Free programming examples and instructions

C Program to Generate Multiplication Table

C Program for how to Generate Multiplication Table

by Krishna


Posted on 26 Jun 2019 Category: C Views: 3489


C Program to Generate Multiplication Table

The program takes an integer input from the user and generates the multiplication table up to the range entered. Range is also a positive integer entered by the user.

PROGRAM

#include <stdio.h>
int main()
{
    int n, i, range;
    printf("Enter an number: ");
    scanf("%d",&n);
    printf("Enter the range: ");
    scanf("%d", &range);
    for(i=1; i <= range; ++i)
    {
        printf("%d * %d = %d \n", n, i, n*i);
    }
    return 0;
}

OUTPUT



Leave a Comment:


Click here to register

Popular articles