C Program to print table of a given number using do-while loop
// C Program to print table of a given number using do-while loop:-
#include<stdio.h>
#include<conio.h>
void main()
{
int
a,i=1;
clrscr();
printf("Enter Number for
table:");
scanf("%d",&a);
do
{
printf("%d * %d =
%d\n",a,i,a*i);
i++;
}while(i<=10);
getch();
}
===================
OUTPUT:-
Enter
Number for table:3
3
* 1 = 3
3
* 2 = 6
3
* 3 = 9
3
* 4 = 12
3
* 5 = 15
3
* 6 = 18
3
* 7 = 21
3
* 8 = 24
3
* 9 = 27
3
* 10 = 30
===================
Comments
Post a Comment