\documentclass[12pt]{article}

\usepackage{verbatim,moreverb,graphicx}
\def\listingoffset{1em}
\def\listinglabel#1{\llap{\tiny\it\the#1}\hskip\listingoffset\relax}
\def\mylisting#1{{\fontsize{10}{11}\selectfont\listinginput[1]{1}{#1}}}
\def\myoutput#1{{\fontsize{10}{11}\selectfont\verbatimtabinput{#1}}}

\begin{document}

I wrote a program called poly.c which was

\mylisting{poly.c}

The output was this:

\myoutput{poly.dat}

The graph was this:

\includegraphics[width=5.5in]{poly.eps}

\end{document}

