Search & Find out

Sunday, December 6, 2009

MULIPLE TABLE

#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

0 comments:

Post a Comment

 

My Blog List

Term of Use