1.) Write a value-returning function named momentum that, given the mass (kg) and velocity (meters per second) of an object, returns its momentum. The formula for momentum is: p=mv
a. Be sure to:
i. Write the prototype pf the function before main
ii. Write the definition of the function after main
2.) Write a function named angleQuadrant that, given an angle in degrees, returns the quadrant (integer value) that the angle falls in. the quadrant values are: 0-90= quadrant 1, 90-180= quadrant 2, 180-270= quadrant 3, 270-360= quadrant 4
a. Be sure to:
i. Write the prototype function before main
ii. Write the definition of the function after main
3.) In your main function, perform the following steps:
a. Prompt the user to enter the mass (kg) and velocity (m/s) of an object
b. Validate that the mass is positive, and that the velocity is not negative (it can equal zero)
c. If all user inputs are valid, call the momentum function and save the return value to a local variable, p. Display the results to the screen to two decimal places. Otherwise, display an error message.
d. Prompt the user to enter a value between 0 and 360 degrees.
e. Validate that the angle is between 0 and 360 degrees
f. If the user input is valid, call the angleQuadrant function, and save the return value to a local variable, quad. Display the results to the screen to two decimal places. Otherwise display an error message.
Any help is greatly appreciated as I, to be honest, have absolutely no clue how to do this and I have an exam on it next week. Thank you to whoever helps!!