Picture of حامد السحلي
c++
by حامد السحلي - Wednesday, 11 January 2012, 04:49 AM
 
# include <iostream>
using namespace std;

void input ( int* ); //input declaration

int calc (int x, int y) {
    int  z;
     z = x + y;
     return z;  
}

void output (int x, int y, int z){
       cout << x << " + " << y << " = " << z << "\n";     
         }

int main () {
    int x, y, z;
    
   input (&x);
    input (&y);
   
    z = calc (x , y);
    output (x, y, z);
   
    system ("pause");
    return 0;
}

void input (int *b){
   
  
    cout << "inter the  number ";
    cin >> *b;

 
}