#include #include using namespace std; //Particle in a box energy transitions: // double AVOGADRO = 6.02214129e23; double R = 8.314e7; double T = 293.15; double rho = 0.998234; double planck = 6.62607004e-34; // units: m^2 kg/s double c = 299792458.0; //units: m/s double me = 9.10938356e-31; // units: kg double r = 1.2e-9; // distance in m double h2 = 4.3904804175e-67; int main() { for (int n=1; n<10; n++) { double delta_E = ((((n+1)*(n+1))-(n*n)) * h2)/(8.0*me*r*r); cout << "Energy difference for transition " << n <<" to " << n+1 << ": " << delta_E << ", wavelength (nm): " << 1e9*planck*c/delta_E << endl; } }