Home Segments Top Top Previous Next

381: Practice

The energy of a moving mass is given by the formula 1/2 mv2. Write a program that accepts the mass and velocity of two automobiles. If the energy of the first automobile is greater than that of the second, your program is to display true; otherwise, your program is to display false. Use double variables for all numbers.