this is the program:
#include <iostream>
using namespace std;
int main()
{
double f0, speed, f1;
f0 = 2e-10;
speed = 75;
f1 = ((speed + 6.685e8) * f0) / (6.685e8 - speed);
cout << "The return frequency corresponding to 75 miles per hour is " << f1 << endl;
return 0;
}
i amsupposed to get a output of 2.000000449 x 10^-10 but i get a output of 2 X 10^-10. i need more decimal places to be shown on the screen.
i did some research and tried this method:
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
double f0, speed, f1;
f0 = 2e-10;
speed = 75;
f1 = ((speed + 6.685e8) * f0) / (6.685e8 - speed);
cout << "The return frequency corresponding to 75 miles per hour is " << f1 << endl;
cout.setf(ios::fixed, ios::floatfield);
cout.precision(13);
return 0;
}
yet it still does not do it. if anyone would respond i would be grateful