// main.cpp  -- driver for fifo class
//              Read a sequence of positive integers, store them in 
//              a fifo, then print them out


#include <iostream.h>
#include "fifo.h"

void main(void)
{
	int who;
	fifo queue;

	createFifo(queue);
	while(1) {
		cout << "Enter a positive integer [0 to terminate]: ";
		cin >> who;
		if (who <= 0) break;
		enqueue(queue, who);
	};
	while (!isempty(queue)) {
		who = dequeue(queue);
		cout << who << endl;
	}
}