Energy and structure of dilute hard- and soft-sphere gases