diff options
| author | Adam Russell <ac.russell@live.com> | 2022-07-31 11:47:12 -0400 |
|---|---|---|
| committer | Adam Russell <ac.russell@live.com> | 2022-07-31 11:47:12 -0400 |
| commit | bb0725d4d9c70ffe10dc57fd8d08308358e4ed55 (patch) | |
| tree | ffda8b71c81f78517c90a229f6f002bc2545a3f7 | |
| parent | 120c33f6513c881cb91cda5a9cee186be7b23ebc (diff) | |
| download | perlweeklychallenge-club-bb0725d4d9c70ffe10dc57fd8d08308358e4ed55.tar.gz perlweeklychallenge-club-bb0725d4d9c70ffe10dc57fd8d08308358e4ed55.tar.bz2 perlweeklychallenge-club-bb0725d4d9c70ffe10dc57fd8d08308358e4ed55.zip | |
cleaned up code
| -rw-r--r-- | challenge-175/adam-russell/fortran/ch-1.f | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/challenge-175/adam-russell/fortran/ch-1.f b/challenge-175/adam-russell/fortran/ch-1.f index d7148a4ab6..637cfe8983 100644 --- a/challenge-175/adam-russell/fortran/ch-1.f +++ b/challenge-175/adam-russell/fortran/ch-1.f @@ -1,11 +1,13 @@ program last_sunday -use datetime_module, only: datetime, timedelta, clock +use datetime_module, only: datetime implicit none character(10), dimension(12) :: last_sundays integer :: month do month = 1, 12 last_sundays(month) = last_sunday_month(month, 2022) +end do +do month = 1, 12 write(*, *) last_sundays(month) end do @@ -18,7 +20,7 @@ contains type(datetime) :: date do day = 20, 31 date = datetime(year, month, day) - if (date % isValid() .and. date % weekday() == 0) then + if (date%isValid() .and. date%weekday() == 0) then write(sunday, '(i4,a1,i0.2,a1,i2)') year, '-', month, '-', day end if end do |
