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

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

👁 1,534 Views
💻 Practical Program
📘 Step Learning
This program prints a multiplication table of 3 from 1 to 10. We have used while loop to achieve our result. Initially i is assigned to 1. The condition to be tested is i<=10. After executing the loop

💻 Program Code

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

🖥 Program Output

3 * 1 = 3
3 * 2 = 6
3 * 3 = 9
3 * 4 = 12
3 * 5 = 15
3 * 6 = 18
3 * 7 = 21
3 * 8 = 24
3 * 9 = 27
3 * 10 = 30
Press any key to continue . . .
                            

📘 Explanation

This program prints a multiplication table of 3 from 1 to 10. We have used while loop to achieve our result. Initially i is assigned to 1. The condition to be tested is i<=10. After executing the loop each time, the value of i is increased by 1. When the value of i becomes 11, the condition becomes false and the 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.