Write a C Program to Print Table ?
Program:
#include<stdio.h>
#include<conio.h>
int main()
{
int i,no,table=1;
printf("Enter any number : ");
scanf("%d",&no);
printf("Table of %d \n",no);
for(i=1;i<=10;i++)
{
table=no*i;
printf("%d",table);
printf("\n");
}
getch();
}
.....................................................................
Output:
Enter any number : 2
Table of 2
2
4
6
8
10
12
14
16
18
20
Program:
#include<stdio.h>
#include<conio.h>
int main()
{
int i,no,table=1;
printf("Enter any number : ");
scanf("%d",&no);
printf("Table of %d \n",no);
for(i=1;i<=10;i++)
{
table=no*i;
printf("%d",table);
printf("\n");
}
getch();
}
.....................................................................
Output:
Enter any number : 2
Table of 2
2
4
6
8
10
12
14
16
18
20
0 Comments:
Post a Comment