Isn't it annoying when you find a piece of code and you don't know what language it was written in? This challenge attempts to somewhat solve this.
Challenge
You will have to write a program that when run in two different languages, will output the string:
This program wasn't written in <language program compiled/interpreted in>, it was built for <other language the program can be run in>!
In the output, language names should have official capitalization. eg: CJam, C++
Neither program should take any input from the user.
When run in both languages, output should be to stdout or equivalent.
There should be no output to stderr in either program.
You may use comments in either language.
Two different versions of the same language count as different languages.
If this is done, the program should output the major version number, and if running on two different minor versions, should report the minor version also.
You should not use prebuilt version functions (this includes variables that have already been evaluated at runtime).
Example output:
Perl and Ruby:
Perl:
This program wasn't written in Perl, it was built for Ruby!
Ruby:
This program wasn't written in Ruby, it was built for Perl!
Python and C:
Python:
This program wasn't written in Python, it was built for C!
C:
This program wasn't written in C, it was built for Python!
Python 2 and Python 3:
Python 2:
This program wasn't written in Python 2, it was built for Python 3!
Python 3:
This program wasn't written in Python 3, it was built for Python 2!
Python 2.4 and Python 2.7:
Python 2.4:
This program wasn't written in Python 2.4, it was built for Python 2.7!
Python 2.7:
This program wasn't written in Python 2.7, it was built for Python 2.4!
This is code golf so the shortest code in bytes wins.
argv[0]
? \$\endgroup\$