Home Segments Index Top Previous Next

111: Practice

The energy of a moving mass is given by the formula 1/2 mv2. Write a program that determines the energy ratio of a car moving at two speeds provided at run time. Write and use a function name square in your solution. Use your program to determine how much more energy a car has when moving at 80 miles per hour than when it is moving at 55 miles per hour.