Hey, guys! I am doing a program that converts radians to degrees and back again. I already have a way to go from radians to degrees but the other way is giving me trouble. I do not know how to do it and get an exact answer in terms of π. any help is appreciated.
For degrees to radians, all you have to do is multiply by π/180. You could just divide the degree value by 180, and display that with ►Frac, and add π to the output.
Why not take the decimal and divide it by Pi? Then you get the Pi component and it's coefficient. So, 2.356 divided by pi would be .75 (you could use the >Frac command to get the fraction), print that out, and print out "π" after it. This is assuming you know that radians is (degrees*pi)/180.

(Souvik seems to have beaten me to the punch)
Will try this when I get back to my calculator on monday. Thanks!
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement