pro4 - 4 5* * * * CGS 2421 - COMPUTER PROGRAMMING FOR...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
5**************************************************************************** * * * CGS 2421 - COMPUTER PROGRAMMING FOR ENGINEERS * * * * PROJECT 4 (pro4.f95) : Quadratic function program * * * * DUE 10/???/09 via the submit option of our * * Web page: * * * **************************************************************************** This project emphasizes modular programming (subroutines and functions) and arrays. In this program, you will work with equations of the form: 2 F(X) = A X + B X + C Your program will be menu driven with the following options: 0 - Quit 1 - Input the coefficients A, B, and C 2 - Evaluate the function, F(X) and derivative F'(X) Your program will compute the quadratic function value and the derivative at several points in a given interval. The derivative at point X is given by: F'(X) = 2 A X + B OPTION 0 The program will terminate. OPTION 1 The user will enter the coefficients of the quadratic equation. OPTION 2 The user will enter a specific a lower limit (LL), an upper limit (UL), and an x-increment (DX). The program is to calculate the function F(X) and the first derivative F’(X) at each X+DX starting with the LL and ending at the UL. To accomplish this, the program will use: REAL(8) A, B, C REAL(8) X, LL, UL, DX REAL(8) F(100), FD(100) F is an array that represents the function value at each X from LL to UL, incrementing by DX. FD is the function’s first derivative at the same X. The
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

pro4 - 4 5* * * * CGS 2421 - COMPUTER PROGRAMMING FOR...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online