//I don't understand why this isn't working
#include <iostream>
using namespace std;
main ()
{
double pizzaDiameter;
int numSlices;
double area;
cout << "Pizza diameter: " ;
cin >> pizzaDiameter;
area = (pizzaDiameter/2.0) * (pizzaDiameter/2.0) * 3.14159;
numSlices = area/14.125;
cout << numSlices << " slices ";
}
当我在 myprogramminglab.com 上处理这个程序时,它说它是正确的。但是,当我在 Visual Studio 中运行它时,它说有一个错误。我只是不明白。