Calculus Computer Lab
Math 190


News

Lab Schedule

QuickBasic Notes

Fortran Notes

Tutor Room

Winplot Manual

Lab Home

xxxxxxxxxxxxxxxxxx

        program annulus
c       This program calculates the area of an annulus.
c       The inner and outer radii are input by the user.
c       A statement function for the area of a circle is used.
        double precision r, area, pi, a, b
        parameter (pi = 3.1415926535897932D0)
        area(r) = pi * r * r
        print *, "Enter the inner and outer radii of the annulus:"
        read *, a, b
        write (*,10) "Area of the annulus: ", area(b) - area(a)
 10     format (a,f25.15)
        end