
- C Programming Tutorial
- C - Home
- C - Overview
- C - Environment Setup
- C - Program Structure
- C - Basic Syntax
- C - Data Types
- C - Variables
- C - Constants
- C - Storage Classes
- C - Operators
- C - Decision Making
- C - Loops
- C - Functions
- C - Scope Rules
- C - Arrays
- C - Pointers
- C - Strings
- C - Structures
- C - Unions
- C - Bit Fields
- C - Typedef
- C - Input & Output
- C - File I/O
- C - Preprocessors
- C - Header Files
- C - Type Casting
- C - Error Handling
- C - Recursion
- C - Variable Arguments
- C - Memory Management
- C - Command Line Arguments
- C Programming useful Resources
- C - Questions & Answers
- C - Quick Guide
- C - Useful Resources
- C - Discussion
C program to print multiplication table by using for Loop
A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times.
Algorithm
Given below is an algorithm to print multiplication table by using for loop in C language −
Step 1: Enter a number to print table at runtime. Step 2: Read that number from keyboard. Step 3: Using for loop print number*I 10 times. // for(i=1; i<=10; i++) Step 4: Print num*I 10 times where i=0 to 10.
Example
Following is the C program for printing a multiplication table for a given number −
#include <stdio.h> int main(){ int i, num; /* Input a number to print table */ printf("Enter number to print table: "); scanf("%d", &num); for(i=1; i<=10; i++){ printf("%d * %d = %d
", num, i, (num*i)); } return 0; }
Output
When the above program is executed, it produces the following result −
Enter number to print table: 7 7 * 1 = 7 7 * 2 = 14 7 * 3 = 21 7 * 4 = 28 7 * 5 = 35 7 * 6 = 42 7 * 7 = 49 7 * 8 = 56 7 * 9 = 63 7 * 10 = 70
- Related Articles
- C Program for Print the pattern by using one loop
- Java program to print a multiplication table for any number
- C++ Program to Print the Multiplication Table in Triangular Form
- C program to print name inside heart pattern using for loop.
- Java Program to Print the Multiplication Table in Triangular Form
- Haskell Program to Print the Multiplication Table in Triangular Form
- C++ Program to Generate Multiplication Table
- C program to print number series without using any loop
- C program to print four powers of numbers 1 to 9 using nested for loop
- C program for Addition and Multiplication by 2 using Bitwise Operations.
- Python Program for Print Number series without using any loop
- Golang Program to Print the Multiplication Table of a Given Number
- C Program to represent a multiplication table.
- Write a C program to print the message in reverse order using for loop in strings
- Print multiplication table of a given number in C

Advertisements