program pol2rec C**************************************************** C Convert polar coordinates (r, theta) to rect. coord (x, y) C C Use: x = r * cos(theta) C y = r * sin(theta) C**************************************************** real r, theta, x, y print *, 'Enter a radius and theta (in radians)' read *, r, theta call pol2recsub(r, theta, x, y) print *, r, theta, x, y stop end C--------------------------------------------------------- subroutine pol2recsub(r, theta, x, y) real r, theta, x, y x = r * cos(theta) y = r * sin(theta) return end