#include< stdio.h >
#include< conio.h >
void main()
{
int i,n;
void pro(int n);
clrscr();
printf("Enter a number: ");
scanf("%d",&n);
pro(n);
getch();
}
void pro(int n)
{
int i;
for(i=1;i<=10;i++)
{
printf("%d X %d = %d\n",n,i,(n*i));
}
}
OUTPUT :
Enter a number :
2 X 1 = 2
2 X 2 = 4
2 X 3 = 6
2 X 4 = 8
2 X 5 = 10
2 X 6 = 12
2 X 7 = 14
2 X 8 = 16
2 X 9 = 18
2 X 10 = 20
#include< conio.h >
void main()
{
int i,n;
void pro(int n);
clrscr();
printf("Enter a number: ");
scanf("%d",&n);
pro(n);
getch();
}
void pro(int n)
{
int i;
for(i=1;i<=10;i++)
{
printf("%d X %d = %d\n",n,i,(n*i));
}
}
OUTPUT :
Enter a number :
2 X 1 = 2
2 X 2 = 4
2 X 3 = 6
2 X 4 = 8
2 X 5 = 10
2 X 6 = 12
2 X 7 = 14
2 X 8 = 16
2 X 9 = 18
2 X 10 = 20
No comments :
Post a Comment