
January 11th, 2013, 02:15 AM
#1
Trying to use C++ to solve a math problem
a=40; b=30; c=10;
d=a^2b^2;f=2*c^2*d*sqrt(d^2/27+c^4);
g=d^3/27+2*c^4*d;h=d/3+(g+f)^(1/3)+(gf)^(1/3);
j=sqrt(c^2d+h);k=sqrt((2*c*d+2*c^3)/j+2*c^2dh);
m=(c+j+k)/2;sqrt(b^2m^2)
I had this riddle to solve and I know the answer to be
around ~ 12.31185723778668829963
What steps can i go about to get this to compute this problem without doing the work for this problem and other problems similar to this?
I'm not used to c++ and just need help with initialization and outputting the answer I got.
Its based off the very old riddle if anyone cares :
http://en.wikipedia.org/wiki/Crossed_ladders_problem
Posting Permissions
 You may not post new threads
 You may not post replies
 You may not post attachments
 You may not edit your posts

Forum Rules

Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.
Featured
