Home Segments Index Top Previous Next

271: 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 and displays 1 if the energy of the first is greater than that of the second; otherwise, your program is to display 0.