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
- Winter '12
- Computer program, Pay particular attention, valid date