Home / Programs / C program to print the multiplication table of 5 from 1 to 10 using do while loop.
🚀 Programming Example

C program to print the multiplication table of 5 from 1 to 10 using do while loop.

👁 17,109 Views
💻 Practical Program
📘 Step Learning
This program prints a multiplication table of 5 from 1 to 10. Do-while loop is used in this program. Initially, the value of i is 1. On each iteration, the value of i is increased by 1 and condition i

💻 Program Code

// C program to print the table of 5 from 1 to 10.

#include<stdio.h>
int main()
{
    int i=1;
    do
    {
        printf("5 * %d = %d\n",i,5*i);
        i++;
    }while(i<=10);
    return 0;
}
                        

🖥 Program Output

5 * 1 = 5
5 * 2 = 10
5 * 3 = 15
5 * 4 = 20
5 * 5 = 25
5 * 6 = 30
5 * 7 = 35
5 * 8 = 40
5 * 9 = 45
5 * 10 = 50
Press any key to continue . . .
                            

📘 Explanation

This program prints a multiplication table of 5 from 1 to 10. Do-while loop is used in this program. Initially, the value of i is 1. On each iteration, the value of i is increased by 1 and condition is tested. When the value of i becomes 11,the condition becomes false and loop is terminated.
📚 Learning Subject

Master Programming Through Practical Examples

Improve your coding logic, problem-solving skills and programming confidence by practicing real-world examples with explanations.

🎯 How to learn from this example

First understand the algorithm carefully. Then study the program line-by-line and compare it with the output. Finally, review the explanation section to strengthen your logic and programming understanding.

🔥 Practice suggestion

Rewrite the program without looking at the code. Modify values, conditions or logic and run it again. This helps improve confidence and strengthens coding skills much faster.