Postlab02_Task1b_rfelde - real :: First_Cap, Second_Cap,...

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

View Full Document Right Arrow Icon
! Lab #2: Fortran Basics ! File: Postlab02_Task1b_rfelde.f95 ! Date: 22 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 asks the user to input the series capacitances and then it calculates the equivalent capacitance. program series ! Initialize the variables
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: real :: First_Cap, Second_Cap, Eq_Cap ! Tell the user to input the series capacitances write(*,*)'Input the first two capacitances in terms of Farads: ' ! Read these values in and assign them to the variables read(*,*) First_Cap, Second_Cap ! Calculate the equivalent capacitance using the equation for series circuits. Eq_Cap = 1 / ((1 / First_cap) + (1 / Second_Cap)) ! Output the resulting information Write(*,*) 'Type ', 'First Capacitance ', 'Second Capacitance ', 'Equivalent Capacitance' write(*,*) 'Series ', First_Cap,' ', Second_Cap, ' ', Eq_Cap 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