New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here


by: Noel Koelpin


Noel Koelpin
GPA 3.81

Dana Haugli

Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Dana Haugli
Class Notes
25 ?




Popular in Course

Popular in Aerospace Engineering

This 5 page Class Notes was uploaded by Noel Koelpin on Sunday September 27, 2015. The Class Notes belongs to AER E 160 at Iowa State University taught by Dana Haugli in Fall. Since its upload, it has received 42 views. For similar materials see /class/214529/aer-e-160-iowa-state-university in Aerospace Engineering at Iowa State University.




Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/27/15
Counter or Indexed DO Loops The essential structure of a counter also called an quotindexedquot DO loop is DO ltindexgt ltstartgt ltendgt ltincrement or step sizegt ltInsert executable statements here on one line after the othergt END DO The quantities ltindexgt ltstartgt ltendgt and ltincrement or stepgt MUST be oftype INTEGER either kind4 or kind8 The ltincrement or step sizegt is optional 7 if left Off FORTRAN will assume a step size of 1 For example DO i 1 n 1 isthe same as DOiln Example 1 This example would write out the even values of i from 2 to 10 0 Example 2 Add up all the even numbers from 2 to 10 Assume that i and sum are both integers DO 1 2 10 2 sum sum i END DO WRITE sum The output in this case the value of sum would be 30 Example 3 Compute the product of all the even numbers from 2 to 10 Assume that i is an integer but product is real To avoid mixed mode use the REAL intrinsic function product l DOi2 102 product productREALi WRITE product The output in this case the value of product would be 3840 Example 4 Compute and write to the screen the first 101 positions x along an x aXis given real values for dx and x0 dx 0160 X0 lel DO 1 0 100 1 X X0 REALidX WRITE i x END DO Questions why is the REAL intrinsic function necessary Does running the loop from 0 to 100 in increments of 1 add up to 101 positions List Directed InputOutput Listdirect inputoutput means reading from the keyboard and writing to the screen without attempting to control the format of the output such as the number of decimals the location on the screen etc Instead FORTRAN reads and writes in lists using its own default format A listdirected read has the form READ ltlist variables separated by commasgt The first asterisk means read from the keyboard and the second asterisk means read in list directed form When the READ statement is executed it waits for the user to type data on the keyboard followed by the ltentergt key then assigns the data sequentially to each variable in the READ statement Each READ statement starts on a new line and reads from lefttoright ie as the data appears on the screen when the user types it in A READ statement is usually preceded by a WRITE statement so that the user is told what to type in Without a preceding WRITE statement the program will show only the cursor on the screen as it waits for input The user typically will not recognize the ashing cursor as a request for input A listdirected WRITE statement has the form WRITE lt TeXt in quotes calculations amp variables separated by commasgt The first asterisk means write to the screen and the second asterisk means write in listdirected form Each WRITE statement starts on a new line and writes out strings and variables from left toright on the screen A WRITE statement with nothing following such as WRITE will display a blank line Calculations may also be performed on the WRITE line as shown in the following example Example 1 This example computes and displays the area of a right triangle All the variables are type REAL WRITE This program computes the area of a right triangle WRITE Please enter the base and height of the triangle READ base height area baseheight2 WRITE The area is area Note the last line in this example could be replaced directly with a calculation such as WRITE The area is baseheight2 eliminating the need for the variable area With base 4 and height 5 the output from this code is This program computes the area of a right triangle Please enter the base and height of the triangle 4 The area is 1000000 Note that the user entered 4 and 5 on the same line FORTRAN will also accept inputs on separate lines This program computes the area of a right triangle Please enter the base and height of the triangle 4 5 The area is 1000000 within a given READ statement but each new READ statement will start on a new line Example 2 This example asks the user for x0 and dx then computes and displays in table form the rst 11 values of x along an xaXis PROGRAM axis IMPLICIT NONE INTEGER i REAL X0 dX X WRITE This program displays the first 11 coordinates along WRITE the X aXis WRITE Please enter the starting value of X and the increment READ x0 dX WRITE i X This line creates a table heading DOi 0 100 1 X X0 REALidX WRITE i X This line creates the table one row at a time END DO STOP END PROGRAM aXis The output from this program is This program displays the first 11 coordinates along the X aXis Please enter the starting value of X and the increment dx 1 X 0000000E00 1000000 2000000 3000000 4000000 5000000 6000000 7000000 8000000 9000000 l000000 komxlmU39IbWNHOIh OOOOOOOOO H O List Dir Page 1


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Allison Fischer University of Alabama

"I signed up to be an Elite Notetaker with 2 of my sorority sisters this semester. We just posted our notes weekly and were each making over $600 per month. I LOVE StudySoup!"

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.