Ask your own question, for FREE!
Computer Science 15 Online
OpenStudy (anonymous):

can anyone help me with a computer science (c++) problem ........... Write a loop that displays a table of angle measures along with their sine and cosine values. Assume that the initial and final angle measures (in degrees) are available in initDegree and finalDegree (type int variables), and that the change in angle measure between table entries is given by stepDegree (also type int variable). Remember that the cmath library’s sin and cos functions take arguments that are in radians. Write this loop using a while statement.

OpenStudy (anonymous):

Logic:- Inputs available: initDegree, finalDegree, stepDegree curDegree=initDegree; while(finalDegree>initDegree){ print-> sin(curDegree), cos(curDegree) curDegree+=stepDegree; }

OpenStudy (shadowfiend):

Don't forget to convert the degrees to radians by multiplying by pi/180.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!