Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<iomanip> //for setprecision()
- #include<cmath> //for pow()
- using namespace std;
- int main()
- {
- double pi = 3.14159, R;
- cin >> R;
- double volume = (4 * pi * pow(R, 3)) / 3;
- cout << "VOLUME = " << fixed << setprecision(3) << volume << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement