#include<iostream.h>
#include<conio.h>
void compute(int,int,int *,int *,int *,int *);
void main()
{
                int a,b,add,sub,mul,div,*pa,*ps,*pm,*pd;
                clrscr();
                cout<<"Enter Two Value :- ";
                cin>>a>>b;
                pa=&add;
                ps=&sub;
                pm=&mul;
                pd=&div;
                compute(a,b,pa,ps,pm,pd);
                cout<<"\nThe Addition = "<<add<<endl;
                cout<<"The Subtraction = "<<sub<<endl;
                cout<<"The Multiplication = "<<mul<<endl;
                cout<<"The Division = "<<div<<endl;
                getch();
}
void compute(int p,int q,int *a,int *s,int *m,int *d)
{
                *a=p+q;
                *s=p-q;
                *m=p*q;
                *d=p/q;
}

114

Advertisements