Wednesday 7 August 2013

Write program of additon ♥♥♥

#include<iostream.h>
#include<conio.h>
class mahi
{
    public :
        int c;
        void add(int a,int b)
        {
            c=a+b;
            cout<<"\n"<<"   "<<c;
        }
        void getname(char *s)
        {
            cout<<"\n"<<s;
        }
};
void main()
{
    clrscr();
    mahi m1;
    m1.getname(" Addition");
    cout<<"\n";
    m1.getname("  A + B");
    cout<<"\n";
    m1.add(10,20);
    getch();
}

Here Is The Output :))


No comments:

Post a Comment