How to display table of a number till user wishes in C++ Programming.
Solution://Program to display table of a number till user wishes.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,a;
char z;
do
{
clrscr();
cout<<"Enter a number to display it's table: ";
cin>>a;
cout<<"Table of "<<a<<" is:"<<endl;
for(i=1;i<=10;i++)
cout<<a<<" X "<<i<<" = "<<a*i<<endl;
cout<<"Do you wish to enter more? (y/n): ";
cin>>z;
}
while(z=='y'||z=='Y');
}