Write a program that computes the volume of a sphere with a 10meter
radius, using the formula
v = 4/3лr3.
can anyone give me the answer?please
Write a program that computes the volume of a sphere with a 10meter
radius, using the formula
v = 4/3лr3.
can anyone give me the answer?please
No.
Post the code(in code tag) that you have problem with.
i can't undestand the solution.....
Code:#include <stdio.h> #define pi 3.14 main() { double radius, volume; printf("radius=10\n"); scanf("%f", &radius); volume=(4.0/3.0)*pi*(radius, 3); printresults(); system("pause"); }
(radius, 3) should be pow(radius, 3). Oh, and you should #include <math.h> for the pow function... or simply write radius * radius * radius.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
And correct format specifier for double(in scanf()) is %lf not %f.
Last edited by Bayint Naung; 08-22-2010 at 09:52 AM. Reason: ...
Write a program that converts the following sentence into english: "M3 r l4zE & r3tard3D!"
Plees gimme anser!!
iMalc: Your compiler doesn't accept misspellings and bad syntax, so why should we?
justin777: I have no idea what you are talking about sorry, I use a laptop and there is no ascii eject or something