We develop an extension of the well-known BCS-theory to systems with trappe
d fermionic atoms. The theory fully includes the quantized energy levels in
the trap. The key ingredient is to model the attractive interaction betwee
n two atoms by a pseudo-potential which leads to a well defined scattering
problem and consequently to a BCS-theory free of divergences. We present nu
merical results for the BCS critical temperature and the temperature depend
ence of the gap. They are used as a test of existing semi-classical approxi
mations.