How to write a C Program To Print Table Horizontally in C Programming Language ?
Solution For C Program :
/*C Program To Print Table Horizontally.*/
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,num;
clrscr();
printf("Enter the no up to which you want table==>");
scanf("%d",&num);
for(i=1;i<=num;i++)
{
for(j=1;j<=10;j++)
{
printf("%d\t",i*j);
}
printf("\n");
}
getch();
}
OUTPUT :
Enter the no up to which you want table==>5
1 2 3 4 5 6 7 8 9 10
2 4 6 8 10 12 14 16 18 20
3 6 9 12 15 18 21 24 27 30
4 8 12 16 20 24 28 32 36 40
5 10 15 20 25 30 35 40 45 50
You may also learn these C Program/Code :