Question: Please use C++!! Goals: Developing problem-solving skills, declaring variables, multi-way branches, data validation Problem: Complete Programming Challenge 4.19 in your text book (Spectral Analysis on
Please use C++!!
Goals: Developing problem-solving skills, declaring variables, multi-way branches, data validation Problem: Complete Programming Challenge 4.19 in your text book (Spectral Analysis on page 226). Do not accept values larger than 10 meters or smaller than 1 x 1020 meters as input for the wavelength (check with a "simple" or "single-branched" if and ask the user to re-enter if his/her input if it is out of range). In addition to category of the wave also output the frequency and energy of the wave given the formula where is the wavelength (m), v is the frequency, and cis the speed of light in a vacuum 3x 108 m/sec) and the formula E=hv where E is the energy (J), h is Plank's constant (6.626 x 1034 J s), and v is the frequency (s). Your output should be like the following with your values in the blanks: meters corresponds to Joules." and has an The energy should be output using 4 significant figures. Note to enter values in scientific notation list the value followed by e and the power of 10. For example you could declare a constant for the value of Plank's constant with the C++ statement const double Plank = 6.626e-034; Goals: Developing problem-solving skills, declaring variables, multi-way branches, data validation Problem: Complete Programming Challenge 4.19 in your text book (Spectral Analysis on page 226). Do not accept values larger than 10 meters or smaller than 1 x 1020 meters as input for the wavelength (check with a "simple" or "single-branched" if and ask the user to re-enter if his/her input if it is out of range). In addition to category of the wave also output the frequency and energy of the wave given the formula where is the wavelength (m), v is the frequency, and cis the speed of light in a vacuum 3x 108 m/sec) and the formula E=hv where E is the energy (J), h is Plank's constant (6.626 x 1034 J s), and v is the frequency (s). Your output should be like the following with your values in the blanks: meters corresponds to Joules." and has an The energy should be output using 4 significant figures. Note to enter values in scientific notation list the value followed by e and the power of 10. For example you could declare a constant for the value of Plank's constant with the C++ statement const double Plank = 6.626e-034
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
