So far I've written this,

#include <iostream>

#include <cmath>

#include <iomanip>

using namespace std;

int main()

{

double pi;

pi = ( asin(1)*2 );

cout << " The value of pi is: " << pi << setprecision(pi) << endl;

}

But I need to place this function in my main.ccp file, place code in my main function to call my pi() function and store the returned value in a variable. Then using cout, display the value, as well as the value of M_PI to the console for comparison purposes.

I was forced to miss lecture this day and now as a result I'm now completely confused regarding what this is even asking for, so any help would be greatly appreciated!

#include <cmath>

#include <iomanip>

using namespace std;

int setprecision(int pi);

int main()

{

double pi;

pi = ( asin(1)*2 );

cout << " The value of pi is: " << pi << endl;

}

int setprecision(int pi)

{

return pi;

}