Mine
public text v1 · immutable#include <iostream>
#include <cmath>
using namespace std;
int main(int argc, char *argv[])
{
int n; long double total;
cout << "Please enter a number" << endl;
cin >> n;
cout << "\n\n";
total=0.0;
for(int i=1; i<=n; i++){
total+=1.0/(i*i);
}
total=6.0*total;
total=sqrt(total);
cout << "Pi calculates out to: " << total << "\n\n" << endl;
system("pause");
}