A Quine in Fortran 90(medium.com) |
A Quine in Fortran 90(medium.com) |
It feels like cheating, but it's also probably the easiest way to get a true quine which'll always work even if you modify parts of the code (while retaining the part of the program which ingests and prints out the file's contents).
A proper quine, though, doesn't require input.
#!/usr/bin/env python2.7
print open(__file__, 'r').read()
Seems like cheating!