Skip to content

Instantly share code, notes, and snippets.

@joaogui1
Created April 18, 2016 23:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joaogui1/d100bf467e844033261731e693399433 to your computer and use it in GitHub Desktop.
Save joaogui1/d100bf467e844033261731e693399433 to your computer and use it in GitHub Desktop.
#include <cstdio>
#include <cmath>
#define PI 3.14159
using namespace std;
int main() {
int r;
double vol;
scanf("%d", &r);
vol = 4.0/3 * PI * pow(r, 3);
printf("VOLUME = %.3f\n", vol);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment