#include void myFunction(); // prototype int x = 5, y = 7; // global variables int main() { using namespace std; cout << "x from main: " << x << endl; cout << "y from main: " << y << endl << endl; myFunction(); cout << "Back from myFunction!" << endl << endl; cout << "x from main: " << x << endl; cout << "y from main: " << y << endl; system("PAUSE"); // prevent the console window from closing return 0; } void myFunction() { using std::cout; int y = 10; cout << "x from myFunction: " << x << endl; cout << "y from myFunction: " << y << endl << endl; }