I'm just staring to learn how to program with IDL , and am trying to write a simple program to ask a user to input an angle in degrees and then have the program output cos(θ), sin(θ) and convert the angle to radians. This is my attempt at creating a program for just the first task of computing cos(θ) so far, but am having no luck. Please let me know if you can help. Thanks for any input!
pro theta
compile_opt idl2
n=0
read, n, prompt= 'Enter angle in degrees'
y=cos(n)
print, y
end
|