Table printing for using do while Loop in c programming.

 

#include<stdio.h>
#include<conio.h>
int main()
{
int num=0,index=1;
printf("enter the number");
scanf("%d",&num);
do
{
printf("%d",(num*index));
index++;
}
while(index<=10);
return 0;
}

Output:7 14 21 28 35 42 79 56 63 70

Comments

Popular posts from this blog

Reverse table in c programming.

Simple interests in c programming