Program Sonnet
Program Sonnet
Integer, Parameter:: L=14, S=10
!L number of lines, S number of syllables per line
Character (Len=6):: Syl(L, S)
Character (Len=80):: Line (L)
Do I=1,L
Do J=1,S
Syl(I,J)=
! here is where you insert
! the poetic thought the computer
!cannot produce
Enddo
Enddo
Do I=1,L
Line(I)=Syl(I,1)
Do J=2,S
Line(I)=trim(Line(I))//trim(Syl(I,J))
Enddo
Enddo
! If you want a rhyming sonnet, start subroutine rhyme
If (line.eq.good) then
Keep
Else
Revise
Endif
Do I=1,L
Write (*,*) Line(I)
Enddo
End Program Sonnet
! October 16, 2018
! For contest all 'dim ones and zeros- A programming contest
! Sponsored by Brahn Bailey
Copyright © Agnes Krampe | Year Posted 2018
Post Comments
Poetrysoup is an environment of encouragement and growth so only provide specific positive comments that indicate what you appreciate about the poem. Negative comments will result your account being banned.
Please
Login
to post a comment