Please write with C++
clear;disp(" The average energy of vibration E of a molecule ");disp(" with frequency f depends on the temperature T ");disp(" according to the equation E=((hf)/(ehf/kT-1)+(½)hf");disp(" -------------------------------------------------- ");h=6.626*10^-27; # erg/sec Planck constantk=1.38*10^-16; # erg/K Boltzmann constantT=310; # K KelvinE=3.97*10^-14; # erga=10^12;b=10^14;for i=1:15c=(a+b)/2;fa = E - (6.626*10^-27)*a /(exp(h*a)/(k*T) - 1) - (3.313*10^-27)*a;fc = E - (6.626*10^-27)*c /(exp(h*c)/(k*T) - 1) - (3.313*10^-27)*c;if fa*fc <>a = a;b = c;elsea = c;b = b;end;if fa*fc == 0fprintf(" kök bulunmuştur\n");end;fprintf(" frekans/kök degeri %.3e \n", c);end;
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here