//Program to print table of given number using for loop
#include<stdio.h>
#include<conio.h>
int main()
{
int n,j,k;
clrscr();
printf("Enter a number\n");
scanf("%d",&n);
printf("Table of %d is as\n",n);
for(j=1;j<=10;j++)
{
k=n*j;
printf(" %d \n",k);
}
getch();
return 0;
}
To Run this Program Copy it in text editor and save as .c
Then double click on it and then it will get opened in your compiler.
Click on run.
#include<stdio.h>
#include<conio.h>
int main()
{
int n,j,k;
clrscr();
printf("Enter a number\n");
scanf("%d",&n);
printf("Table of %d is as\n",n);
for(j=1;j<=10;j++)
{
k=n*j;
printf(" %d \n",k);
}
getch();
return 0;
}
To Run this Program Copy it in text editor and save as .c
Then double click on it and then it will get opened in your compiler.
Click on run.
C++ program to Print Table of any Number
ReplyDeletePrint table of any number in c++ is depend of general concept of generate table of any number, we can multiply any number with 1 to 10.
Print Table of any Number in C++
ReplyDeleteThanks for sharing this code. It is very simple and easy.
Please add output i may be nice
ReplyDeletePlease add output i may be nice
ReplyDeletethank you sooo much
ReplyDeleteThanks but please add output
ReplyDeleteGalat hai output shi nhi de rha hai
ReplyDeleteWrite a C program to Print table of entered number by user through keyboard using for loop.
ReplyDeleteCode of given problem:
int main()
{
int i=0,num;
printf("Enter the number to find its table:\t");
scanf("%d", &num);
for(i=1;i<=10;i++)
{
printf("%d\n",num*i);
}
return 0;
}
for loop program examples
Thanks!