Calculate volume of a cylinder with user input
Your implementation is quite simple,
but a bit hard to read:


It's a wall of code, with no vertical spacing to visual separate closely related groups
The ordering of statements is haphazard, with no discernible underlying logic


Consider this alternative:

#include &lt;iostream&gt;
#include &lt;cmath&gt;

long double calculateCylinderVolume(long double radius, long double height)
{
    return acos(-1) * radius * radius * height;
}

int main()
{
    std::cout &lt;&lt; "Hello to the cylinder volume solver!\n";

    std::cout &lt;&lt; "Please enter the cylinder's radius: ";
    long double radius;
    std::cin &gt;&gt; radius;

    std::cout &lt;&lt; "\nPlease enter the cylinder's height: ";
    long double height;
    std::cin &gt;&gt; height;

    std::cout.precision(1000);
    std::cout &lt;&lt; "\nThe cylinder's volume is "
        &lt;&lt; calculateCylinderVolume(radius, height) &lt;&lt; ".\n";
}


Notice that:


variables are not declared sooner than really needed
the std::cout.precision(1000); is delayed until it's actually needed
the blank lines visually separate the closely related statements, improving readability


Other minor improvements:


using namespace std is considered bad practice
return 0 at the end of main is unnecessary
\n is more efficient than std::endl
#include &lt;cmath&gt; instead of #include &lt;math.h&gt;, as pointed out by @FredLarson