// This program uses two functions that accepts addresses off 
// variables as arguments
#include <iostream>
using namespace std;

// function prototype
void getNumber(int *);
void doubleValue(int *);

int main()
{
    int number;
    
    // Call getNumber and pass the address of number 
    getNumber(&number);
    
    // display the value in number
    cout << "That value doubled is " << number << endl;
    return 0;
}
 
 
//******************************************************************
// definition of getNumber. The parameter, input, is a pointer     *
// This function asks the user for a number. The value entered     *
// is stored in the variable pointed to by input                   *
//******************************************************************

void getNumber(int *input)
{
    cout << "Enter an integer number: ";
    cin  >> *input;
}

//******************************************************************
// definition of doubleValue. the parameter, val, is a pointer     *
// this function multiplies the variable pointed to by val by      *
// two                                                             *
//******************************************************************

void doubleValue(int *val)
{
    *val *= 2;
}