How would I take the java code I wrote and make the calculation be able to do degrees?
<p>I would like to take my cubic function calculator and make a possiblity to be able to use degrees. How would I alter the code to do so?</p>

<pre><code>    c.println("Welcome to this program which will help you solve a cubic function");    //top text
c.println ("");
c.println("Please enter coefficients in the following form");                       //explaining the format
c.println("f(x) = ax^3 + bx^2 + cx + d");


c.print(" Enter your X value: ");               //asking for the x value
double x = c.readDouble();

c.print("Enter your first coefficient (a): ");  //asking for the x value
double a = c.readDouble();

c.print("Enter your second coefficient (b): "); //asking for the x value
double b = c.readDouble();


c.print("Enter your third coefficient (c): ");  //asking for the x value
double c1 = c.readDouble();

c.print("Enter your last coefficient (d): ");   //asking for the x value
double d = c.readDouble();

c.println(CubicFunction(x,a,b,c1,d),0,2);       //prints out the final result, rounded to 2 decimals
c.println ("");

int choice = 1; // initializes choice to 1 so it can enter the main loop

while (done == false)   //main loop
</code></pre>
