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

C Programming Language Loop control in C Language (Article) Loop control in C Language (Program)

3116

Program:

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

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

Output:

9 * 1 = 9
9 * 2 = 18
9 * 3 = 27
9 * 4 = 36
9 * 5 = 45
9 * 6 = 54
9 * 7 = 63
9 * 8 = 72
9 * 9 = 81
9 * 10 = 90
Press any key to continue . . .

Explanation:

This program prints a multiplication table of 9 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.

This Particular section is dedicated to Programs only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.