CAN SOMEBODY HELP ME WITH THIS HW

Create a library with functions that convert between angles expressed in radians, degrees, and revolutions. Each function has a return type of double and an input A, also of type double:

- rad2deg: given input A in radians, return the value of the angle in degrees

- deg2rad: given input A in degrees, return the value of the angle in radians

- rev2deg: given input A in revolutions, return the value of the angle in degrees

Next, creat a program that makes use of your library. Ask the user to specify whether he/she wants to convert radians to degrees, degrees to radians, or revolutions to degrees. Depending on the choice, ask the user to specify the input value and call the correct function in the library. Output the result. You can use 3.1416 for the value of pi.
rad2deg takes one input (number of radians) and outputs the number of degrees. The formula is degrees=radians*180./3.1416
deg2rad is similar, takes input number of degrees. The formula to calculate radians is radians=degrees*3.1416/180.
rev2deg takes number of revolution. Each revolution is 360 degrees
You can implement these functions in a header file (call it say angles.h)
Next you need to write your test.cpp. You must have #include "angles.h" at the top of your code
Topic archived. No new replies allowed.