Define The Constants // in Unit of J.S // in Unit of KG // It The Lenght of The Box
Define The Constants // in Unit of J.S // in Unit of KG // It The Lenght of The Box
#include<cmath>
double
wavefunction(int n, double x)
double energy(int n)
return sum;
int main()
int n;
std::cin >> n;
double x;
std::cin >> x;
x /= 100;
std::cout << "Wavefunctin of " << n << " state at the position x = " << x * 100 << "cm is " << psi <<
std::endl;
double E = energy(n);
std::cout << "Energy of " << n << " state is " << E << "J" << std::endl;
std::cout << "Expectation value of x " << exp_x * 100 << "cm" << std::endl;
return 0;