script for creating cylinder primitives wanted!

Hi guys!

I need a script which will create cylinder with cross-section area equal to cross-section area of real cylinder with diameter in input field. So in general cylinder produced by this script should be a bit bigger, than primitive "cylinder" with the same diameter, and its radius should depend on number of sides in this cylinder.