1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
void function(int &,int &,int &,int &,int x,int y);
void main () {
int add,sub,mul,div,x,y;
cout<<"Enter numbers x,y: "<<endl;
cin>>x>>y;
function(add,sub,mul,div,x,y);
cout<<"Addition: "<<add<<endl;
cout<<"Subtraction: "<<sub<<endl;
cout<<"Multiplication: "<<mul<<endl;
cout<<"Division: "<<div<<endl;
}
void function(int &a,int &s,int &m,int &d,int x,int y) {
a=x+y;
s=x-y;
m=x*y;
d=x/y;
}
|