Make a simple Calculator Using Binary Operator in C++ Programming Language

#include<conio.h>
#include<iostream.h>
class cal
{
    int x;
    public:
        void getdata(int x1)
        {
            x=x1;
        }
        void sum(cal a1,cal a2)
        {
            cout<<"\n additoin  "<<a1.x+a2.x;
            cout<<"\n subtraction  "<<a1.x-a2.x;
            cout<<"\n multiplication  "<<a1.x*a2.x;
            cout<<"\n division  "<<a1.x/a2.x;
        }
};
void main()
{
    cal c1,c2,c3;
    clrscr();
    c1.getdata(10);
    c2.getdata(5);
    c3.sum(c1,c2);
    getch();
}
Make a simple Calculator Using Binary Operator in C++ Programming Language Make a simple Calculator Using Binary Operator in C++ Programming Language Reviewed by Unknown on 6:10:00 PM Rating: 5

No comments:

Powered by Blogger.