Write a program to calculate the Dottie number. This is the number you get when you type any number into a scientific calculator and then repeatedly press the
cosbutton, with the calculator set to radians. The number displayed updates, getting closer and closer to a certain number, and eventually stops changing.
coshere is the trigonometric function cosine, but you don’t need to know any trigonometry, or what cosine means, for this challenge. Just do the same thing you would with a handheld calculator: take cosine over and over again until you get the answer.
My solution is below the fold (I didn’t do optional challenge #3, mostly because real work had to be done before I got to it).