You never assigned a variable to
You’re using the
radius variable to calculate the
radius doesn’t have a value; it was never initialized.
double radius = 0.0;
would fix it. It is good practice to set (initialize) your variables to something when you declare them.