Last active
December 6, 2015 04:43
-
-
Save GlenDC/fe29dc3e8dc77d7c6078 to your computer and use it in GitHub Desktop.
My first attempt for the Quine Challenge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROGRAM QUINE | |
IMPLICIT NONE | |
INTEGER :: i | |
CHARACTER(LEN=80), DIMENSION(10) :: Source | |
Source(1) = "PROGRAM QUINE" | |
Source(2) = " IMPLICIT NONE" | |
Source(3) = " INTEGER :: i" | |
Source(4) = " DO i=1, 3" | |
Source(5) = " DO i=1, 5" | |
Source(6) = " END DO" | |
DO i=1, 3 | |
WRITE(*,*) Source(i) | |
END DO | |
DO i=1, 6 | |
WRITE(*,*) " Source(" // CHAR(48+i) // ") = """ // TRIM(Source(i)) // """" | |
END DO | |
END PROGRAM QUINE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment