Loading...

Print Table of any Number C Program


C Program which take a number as input and print their table:

#include <stdio.h>
#include <conio.h>
main()
{
    int a,c,n;
    char x;
   
    do
    {
        printf("Enter Number: ");
        scanf("%d",&n);
        printf("\n");

        for(a=1;a<=10;a++)
        {
            c=n*a;
            printf("\t%d * %d = %d\n",n,a,c);
        }
        printf("\nDo you want to do next y/n\n");
        x=getch();
    }
    while(x!='n');
}



Rate this posting:
{[['']]}

0 comments:

Post a Comment

 
TOP