erok81
- 454
- 0
Okay, I think my mistake lies in the exponent.
Here is my new code:
However, it still doesn't work.
Here is my new code:
Code:
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
float r;
const double Bohr_radius = 5.2917721092E-11;
const double Pi = 3.14159256;
for (r = 0.0; r <= 10*Bohr_radius; r += .01*Bohr_radius)
{
cout << r << "\t" << 4*Pi*r*r*(pow((1/(sqrt(Pi)))*(1/(pow(Bohr_radius,3/2)))*(exp*(-r/Bohr_radius))),2) << endl;
}
return 0;
}
However, it still doesn't work.
