Pages

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

Wednesday 17 April 2013

#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;
}
    

 

Search Box

Most Reading

Contact Form

Name

Email *

Message *