Program to print table by do while loop.

Program:-

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int n;
cout<<"\nEnter the number to print the table";
cin>>n;  // table to print
cout<<endl;
int i =1;
do
{
cout<< n <<"*" << i <<"="<<n*i<<endl;
i++;
}
while(i<=10);
getch();
}

Output:-


Post a Comment

0 Comments