0% found this document useful (0 votes)
1 views1 page

Multiplication Table Program

Uploaded by

Waseem Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views1 page

Multiplication Table Program

Uploaded by

Waseem Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

C Program to Print Multiplication Table

#include <stdio.h>

int main() {
int i, j, n;

// Input the table range


printf("Enter the number of terms (n): ");
scanf("%d", &n);

// Print the header


printf("\nMULTIPLICATION TABLE\n");
for (i = 2; i <= 6; i++) {
printf("%4d", i); // Align numbers properly
}
printf("\n");

// Print the multiplication values


for (i = 1; i <= n; i++) {
for (j = 2; j <= 6; j++) {
printf("%4d", i * j);
}
printf("\n"); // Move to the next row
}

return 0;
}

Sample Output:

MULTIPLICATION TABLE
2 3 4 5 6
2 3 4 5 6
4 6 8 10 12
6 9 12 15 18
8 12 16 20 24
10 15 20 25 30
12 18 24 30 36
14 21 28 35 42
16 24 32 40 48
18 27 36 45 54
20 30 40 50 60

You might also like