The orbit can be expressed in polar coordinates as r=p/(1-ecos(theta)) where r and theta are the distance and angle of the satellite from the center of the earth, p is a paremter where p=1200 km, and e is a parameter representing eccentricity.

I'm supposed to write a program to calculate the distance of the satellite from the earth as a function of theta if the satellite has an eccentrity of 0, .25, .5, .75, and 1.

Write the program to input values of e and theta. Here is what I have done:

program calculating_orbits

implicit none

real :: r !distance of the satellite from the center of the earth

real :: theta !angle of the satellite from the center of the earth

real, parameter :: p=1200 !parameter specifying the size of the orbit

real :: e !parameter specifying the eccentricity of the orbit

write (*,*) 'This program accepts inputs of theta and e and outputs the

+ value of r=p/(1-e*cos(theta)).'

write (*,*) 'This program will run until a number not in the domain

+ is inputted.'

do

write (*,*) 'Please input a real number.'

read (*,*) e

read (*,*) theta

Now I get stuck. Any hints?