Question

of 3,5 in and a height of 1.45 in. 2 (General math) a. Design, wrire, compile, and run a Cs program to calculate the volume of a sphere with a radius, r, of 2 in. The volume is given by this fornula 4n h. Nlanually cheuk the values computed by your program. After verifying that your program is working coseertly, madify it to determine the volume of a cuhe with a radius of 1,67 in
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1 #include iostream» 2 using namespace std; 4 int main) 6 1 double r = 2; double volume * (22.0/7.0) * 4 (r*r*r) / 3; = cout << volume; 10 12 I Output: 33.5238

#include <iostream>

using namespace std;

int main() {

double r = 1.67;

double volume = 4 * (22.0/7.0) * (r*r*r) / 3;

cout << volume;

}

// Output: 19.517

Add a comment
Know the answer?
Add Answer to:
of 3,5 in and a height of 1.45 in. 2 (General math) a. Design, wrire, compile,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT