Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 13 Online
OpenStudy (anonymous):

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)

OpenStudy (anonymous):

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.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Breathless: Spooky witch but cute
5 hours ago 3 Replies 0 Medals
Arriyanalol: help
5 hours ago 10 Replies 2 Medals
Arriyanalol: @tinydinoUwU stop trying to find a argument u blad lil boy
1 day ago 5 Replies 4 Medals
Jaded012023: Please tell me what you all think of this song
8 hours ago 6 Replies 1 Medal
Arriyanalol: bro how
8 hours ago 2 Replies 3 Medals
Arriyanalol: cant wait for the new bluey movie in 2027
1 day ago 12 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!