-1
The entrance R
is requested afterward to be used in the calculation. You need to change the code for something like
#include <math.h>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
float R;
float pi = 3.14159;
float volume;
cin >> R;
volume = (4.0 / 3) * pi * pow(R, 3);
cout << fixed << setprecision(3);
cout << "VOLUME = " << volume << endl;
}
Maybe you should read the variable
R
before to use it in the calculations.– anonimo