Sunday, January 2, 2011

Area of Circle in Fortran

I had a really happy holiday, mostly because I did significantly better at school this fall than I anticipated. Got to play the game of spoons on Christmas day. Well, its back to being serious. Just wrote this simple Fortran program. It basically calculates the area of circles given 5 radii. If a negative value is entered for the radius, the program terminates after complaining. This implies that a negative numeric value can be used as a sentinel in the event one intends to calculate the area of fewer than five circles. As usual, attached is a screen shot of the code. Its a very very simple program.


























Like I said, its a simple program. I hope it proves useful to someone. Heads up, if time permits I'll be writing some Fortran programs for stuffs I learn in mech and vibes, thermodynamics and heat transfer and flight mechanics. I'm bailing out for now.

Oh! I almost forgot, Happy New Year to everyone.

No comments:

Post a Comment