Lab04_CFU_rfelde - increments of three It also outputs all of the values calculated while the loop was running program implicit none Initialize

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
! Lab #4: CFU ! File: Lab04_CFU_rfelde.f95 ! Date: 30 January 2008 ! By: Ryan Robert Felde ! rfelde ! Section: 02/01, 11:30, and ENAD 138 ! Team: 16 ! ! ELECTRONIC SIGNATURE ! Ryan Robert Felde ! ! The electronic signature above indicates the program submitted for ! evaluation is my individual work and I have a general understanding ! of all aspects of its development and execution. ! ! A BRIEF DESCRIPTION OF WHAT THE PROGRAM OR FUNCTION DOES ! This program runs a loop to determine that value of a function for the set of numbers starting at -9 and going to 9 in
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ! increments of three. It also outputs all of the values calculated while the loop was running. program implicit none ! Initialize variables real:: I, Y ! Set up the index to run from -9 to 9 in increments of 3 do I = -9, 9, 3 ! Set conditional statement based on the conditions given and perform calculations based on these. if (I >= 0) then Y = (-3 * (I**2)) + 5 else Y = (3 * (I**2)) + 5 end if ! Write out the value of the index and the function for each iteration of the loop. write(*,*)'t = ', I, ' y(t) =', Y end do stop end...
View Full Document

This note was uploaded on 10/05/2009 for the course ENGR 117 taught by Professor Staff during the Spring '08 term at Purdue University-West Lafayette.

Ask a homework question - tutors are online