C Program to Print Table of a Given Number

In this program, the user is ask to enter the integer number, then the table of that number is the output will shown on console.



Source Code
#include <stdio.h>
void main()
{
    int num, i=1;
    printf("Enter the number: ");
    scanf("%d", &num);
    printf("Table of %d is as\n", num);
    while(i <= 10)
    {
        printf("%d\n", num*i);
        i++;
    }
    getch();
}
Output
Enter the number: 5
Table of 5 is as
5
10 
15 
20 
25 
30 
35 
40 
45 
50





"Coding Hub - Learn to code" app now available on Google Play Store