To write a program that inputs a number, passes that through a function and generates its table follow the following commands.
#include<stdio.h>
#include<conio.h>
void table(int);
void main (void)
{
int t=0;
clrscr();
printf(“enter table no. : “);
scanf(“%d”,&t);
table(t);
getch();
}
void table(int t);
{
int a;
for(a=1;a<=10;a++)
{
int p=t*a;
printf(“\t\t\n%d x %d = %d \n”,t,a,p);
}
}
August 28, 2011