{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture-03.2

# Lecture-03.2 - Week 3.2 CSE 1540.03-end Question Validate...

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

CSE 1540.03 Week 3.2 January 18, 2012 You can measure a programmer's perspective by noting his (or her) attitude to the continuing vitality of FORTRAN Alan Perlis It is easier to write an incorrect program than understand a correct one. Alan Perlis If a listener nods his (or her) head when you're explaining your program, wake him (or her) up. Alan Perlis Lab 3 Question: Verifying the first root if (count .GT. 0) then print*, "Verifying the first root... :" print*, a * root1 * root1 + b * root1 etc. end if Question: Validate, with error message ! -------------------------- Validate if (a equals zero ) then print message else ! ----------------------- Find delta delta = b * b – 4. * a * c etc. – notice indentation end if this is a new end if ! -------------------------- end Question: Validate and handle linear case ! -------------------------- Validate if (a equals zero ) then solve: 0 = + c bx else ! ----------------------- Find delta delta = b * b – 4. * a * c etc. – notice indentation end if this is a new end if ! -------------------------- Show Results if (count .EQ. 2) then write(*,20) etc. =============================================== Extra: Validate and handle all cases ! -------------------------- Validate if (a equals zero ) then if (b equals zero ) then if (c equals zero ) then solve: 0 = c else solve: 0 = c

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 5

Lecture-03.2 - Week 3.2 CSE 1540.03-end Question Validate...

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

View Full Document
Ask a homework question - tutors are online