C Online Compiler
Example: C Program to Print Multiplication Table of any Number using For loop
C
C++
C#
Java
Python
PHP
main.c
STDIN
Run
// C Program to Print Multiplication Table of any Number using For loop #include <stdio.h> int main() { int x, r, i; // x - To store the input number // r - To store the multiplication range printf("Enter the input number is::\n"); scanf("%d", &x); printf("\nEnter the range number is::\n"); scanf("%d", &r); printf ("\n\n------The above multiplication table--------\n\n"); for (i = 1; i <= r; i++) { printf("%d * %d = %d\n", x, i, x * i); } return 0; }
10 14
Output
Clear
ADVERTISEMENTS