/*
  Name:          annedawson.com/local.cpp
  Compiler:      Dev-C++ 4.9.9.2
  Copyright:     2006
  Author:        Anne Dawson
  First created: 23/09/99
  Last updated:  21/01/06 8:39
  Description:   This program demonstrates local variables
*/                                 
#include <iostream> 
using namespace std;


void double_it(int num); // function declaration or prototype
// this function receives an integer and outputs the integer multiplied by two

int main( )
{
	 int number = 5;
	 cout << "The number in main() is :" << number << endl;
     cout << endl;
	 double_it(number);
	 cout << endl;
	 cout << endl;

	 cout << "Inside function main " << endl;
	 cout << "the value of number is now: " <<  number;

     cout << endl << endl << "Press any key to end the program...";
     cout << endl;
	 cout << endl;
     system("Pause");


	 return 0;
}


// this function receives an integer and outputs the integer multiplied by two
void double_it(int num)
{
	 int number = 6;
	 num = num * 2;
	 cout << "Inside function double_it " << endl;
	 cout << "the value of num is now: " <<  num << endl << endl;
	 cout << "Inside function double_it " << endl;
	 cout << "the value of number is now: " <<  number  << endl;
     cout << endl << endl << "Press any key to end the function...";
     cout << endl;
	 cout << endl;
     system("Pause");


}



