fixed diameter.cpp