Ask Question
12 August, 12:56

Create an application in VB that allows the user to enter an object's mass, velocity, and height and displays the object's KE and PE. The application should have a two functions: KineticEnergy that accepts an object's mass (kilograms) and velocity (meters/second) as arguments and PotentialEnergy that accepts an object's mass (kilograms), acceleration due to gravity (m/s2), and height (meters) as arguments. The function should return the objects KE and PE (3 decimal places).

+2
Answers (1)
  1. 12 August, 15:57
    0
    see explaination

    Explanation:

    Module VBModule

    Function KineticEnergy (ByVal mass As Decimal, ByVal velocity As Decimal) As Decimal

    Dim result As Decimal

    result = 0.5*mass*velocity*velocity

    KineticEnergy = result

    End Function

    Sub Main ()

    Dim mass = Console. ReadLine ()

    Dim velocity = Console. ReadLine ()

    Console. WriteLine (FormatNumber (CDbl (KineticEnergy (mass, velocity)), 3))

    End Sub

    End Module
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Create an application in VB that allows the user to enter an object's mass, velocity, and height and displays the object's KE and PE. The ...” in 📘 Engineering if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers