Table
Write a program to print out the table of the number input through the keyboard.
#include
#include
void main(void)
{
int a,s,d;
printf("Enter the number:");
scanf("%d",&a);
for(s=1;s<11;s++)
{
d=a*s;
printf("%d * %d = %d\n",a,s,d);
}
getch();
}
#include
#include
void main(void)
{
int a,s,d;
printf("Enter the number:");
scanf("%d",&a);
for(s=1;s<11;s++)
{
d=a*s;
printf("%d * %d = %d\n",a,s,d);
}
getch();
}
Comments
Post a Comment