Thursday, 6 December 2012

C++ Table program can get Table of any number by again and again input the value


#include<iostream.h>
#include<conio.h>

void main()
{
int inpt;
char ch;
do
{
gotoxy(15,7);
cout<<"please enter the number for the table to generate= ";
cin>>inpt;
int a=31,b=10;
gotoxy(25,9);
cout<<"xxxxxxxxxxxxxxxxxxxxxxx";
for(int x=1;x<=10;x++)
{int total;
gotoxy(a,b);
total=x*inpt;
cout<<inpt<<" X "<<x<<" = "<<total;
b++;
}
gotoxy(25,20);
cout<<"xxxxxxxxxxxxxxxxxxxxxxx";
gotoxy(32,22);
cout<<"Thank you"<<endl;
gotoxy(20,24);
cout<<"want another table please enter number above table"<<endl;
}while(ch='c');
getch();
}