anyone can help me how to write the pseudocode for this problem? in eisntein's famous equation E=mc^2,the energy E is in joules if the mass,m is in kilograms and c is the speed of light in metres per second(=2.9979x10^8).write the pseudocode that uses a subprogram to calculate the energy equivalent of a given mass.roughly how much energy is equivalent to the mass of a sugar cube (approximately 1 gram)
You can think this problem like this: You have a main function that will ask for input (mass in kilograms), and then pass it to a subprogram/function that will return the value of the evaluated formula, assuming that the input was given in the right units (you can check this, but it's not required). Then you run with the test case that the input is 1 gram. I assume that the user will have to input in kilograms, even if it's in grams.
Join our real-time social learning platform and learn together with your friends!