// E02_181S05_p1.cc
// Example program for CISC181 Midterm Exam 2
// P. Conrad, Spring 2005

#include <iostream>
using namespace std;

struct Node
{
  int data;
  Node *next;
};

int main(int argc, char *argv[])
{
  int x;
  double y;
  int z;
  int *a;
  double *b;

  Node n;
  n.data = 12;
  n.next = NULL;

  x = 3;
  y = 7.3;
  z = 8;
  a = &z;
  b = &y;

  Node *head = NULL;
  Node *tail = NULL;
  Node *p = NULL;

  head = new Node;
  head->data = 3;
  head->next = NULL;
  tail = head;

  p = new Node;
  p->data = 6;
  p->next = NULL;
  tail -> next = p;
  tail = p;

  p = new Node;
  p->data = 10;
  p->next = NULL;
  tail -> next = p;
  tail = p;

  return 0;
} // end main

