Program to print tables till given number in c.

#include<stdio.h>
#include<conio.h>
void main()
{
    int n;
    clrscr();
    printf("enter no. of tables=");
    scanf("%d",&n);
    for(int i=1; i<=n; i++)
    {
     printf("\ntable of %d=\n",i);
     for(int j=1; j<=10; j++)
     {
      printf("%d\n",i*j);
     }
     printf("\n");
   }
   getch();
}

■》 Output->

enter no. of tables=3

table of 1=
1
2
3
4
5
6
7
8
9
10


table of 2=
2
4
6
8
10
12
14
16
18
20
 
table of 3=
3
6
9
12
15
18
21
24
27
30

Comments

Popular posts from this blog

Introduction of java Programming language.

Stack data structure.