#include "iostream.h"
#include "conio.h"
class mult
{
private:
int n,x;
public:
void accept ()
{
cout << "Welcome to Multiple Table\n\n";
cout << "Enter a number: ";
cin >> n;
}
void cal ();
};
void mult :: cal ()
{
for (int i=1; i<11; i++)
{
x = n * i;
cout << endl << n << " x " << i << " = " << x << endl;
}
}
void main ()
{
clrscr ();
mult M;
M.accept ();
M.cal ();
getch ();
}
Get the executable ( .exe ) file for this program..
Download
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment