<>

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

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

 
TOP