V=((S/3)*sqrt(S/3.14)*pow(tan(3.14/4-L/2),-3)*pow(tan(L),-1));
Can you try the above,It displays non 0 output.
Also the formula u shared has tan cubed, but in your code you have used cube root,I thinks its wrong.
I would suggest that you break the individual pow,tan functions & assign them to seperate variables & finally perform the calcualtion on these individual variables.There are associativitey & precedence rules for operators which I find it difficult to always keep them in mind.
eg
double root_S_by_pi = sqrt(S/3.14);
double tanL_by_2= tan(3.14/4-L/2);
..
..
//finally
V=((S/3)*root_S_by_pi*pow(tanL_by_2,-3)*tan(L));
//V=((S/3)*sqrt(S/3.14)*pow(tan(3.14/4-L/2),-3)*pow(tan(L),-1)); //<--- original code
Also check the sample usage of tan() on this page: https://www.cplusplus.com/reference/cmath/tan/
Specifically note usage of tan :-->
result = tan ( param * PI / 180.0 );
I think thats how the tan () should be invoked.