This preview shows page 1. Sign up to view the full content.
Unformatted text preview: program Lab6 implicit none character*9 month integer monthNum, pos character*108 months months = "January February March April & &May June July August & &SeptemberOctober November December " print*, "Enter the month name" read*, month pos = index(months,month) if (pos .eq. 0) then print*, "The month is invalid" else monthNum = pos/9 + 1 ! process day print*, month, " is month #", monthNum print*, "now process day" end if stop end 3. input the day and check for valid date if ( February ) then if ( valid day ) then output date else error message end if else if ( April, June, September or November ) then if ( valid day ) then etc. CSE 1540 Week 6.2.2 February 8, 2012 page 1 of 1...
View Full Document
This note was uploaded on 02/13/2012 for the course CSE 1540 taught by Professor Hofbauer during the Winter '12 term at York University.
- Winter '12