Write a program to print table of given number using function.

4/17/2013 07:41:00 pm Unknown 0 Comments

#include<stdio.h>
#include<conio.h>
 int table(int,int);// function prototype
int main()
{
   
    int number,a;
    printf("Enter the number of table \n");
    scanf("%d",&number);
    for(a=1;a<=10;a++){
    //printf("%d*%d=%d\n",number,a, table(number,a));} //function call
    table(number,a);}
    getch();
}
int table(int t , int b)// function definition
{     
    printf(" %d*%d=%d\n",t,b,b*t);
    //return b*ta;
}