// *************************************************************** //
//  Jeff Balsley  11/15/2001                                       //
//  Assignment 6 problem 4                                         //
//                                                                 //
// *************************************************************** //

#include<iostream>
using namespace std;


//  Define the node structure

struct node {
	void initialize(int aValue);
	void show(void);
	int get(void);
	int myData;
	node* nextPtr; // pointer to next node
};

int main(void)
{
	node myNode;
	int me = NULL;
	int value;
	
	cout << "Enter a value > ";
	cin >> value;

	myNode.initialize(value);
	myNode.show();
	cout << "\n";
	cout << 2 * myNode.get();
	return 0;
}

// ******************************************************************** //
//  this function will initialize myData to the given value             //
// ******************************************************************** //
void node::initialize(int aValue)
{
	myData = aValue;
	nextPtr = NULL;
}

// ******************************************************************** //
//  This function will print the value of myData                        //
// ******************************************************************** //
void node::show(void)
{
	cout << myData;
}

// ******************************************************************** //
//  This function will return the value of myData                       //
// ******************************************************************** //
int node::get(void)
{
	return myData;
}