1 / 3 is integral division which results in 0. 1 / 3.0 would result in a double, if I remember right (either that or a float). Make sure you don't just store it in an integer or it will be truncated back to 0.
1/3.0 is indeed a double value. 1/3.f or 1/3.0f are floats.
Note that the smaller operand gets converted to the type of the larger operand when the types of the operands of a binary operation don't match, so 1/3.0, 1.0/3, and 1.0/3.0 all mean the same thing.
Ok, I got the 1/3 issue, which I should have caught since my professor specifically said to watch out for that. But after fixing it I still get these huge numbers for the <volume> output. Just to test my math I replaced <vol = (thi * pi) * (r * hei);> with <vol = 0> and the function output <0> as the <volume>, as it should have. I am assuming this would indicate my volume formula has an issue, correct? Which I cannot find. But....since I get a different <volume> output every time I run the program, there must be something else going on right? Is it because I have more than one math function in the same user-defined void function?
You're declaring two variables called thi. One in the global scope and another in the local scope of main(). The latter obscures the former, and is also uninitialized.
So I simply changed <1.0 / 3.0> to 3.333 and it works great. I will read up on globals since I really do not know what they are or what you mean (haven't covered them yet). Your earlier comments did lead me to the <thi> issue so, thank you. I now have a great understanding of functions. Once again thank you.