Produce a program A such that running it in language A produces Program B, and running program A in language B produces program C.
Program B, when run in language B produces Program A, and running program B in language A produces program C.
Program C, when run in language A or language B, prints "Wrong language!".
Program | Language | Result
--------|----------|----------
A | A | Program B
B | B | Program A
A | B | Program C
B | A | Program C
C | A | "Wrong language!"
C | B | "Wrong language!"
Your answer should use this template:
Language A/Language B, {a bytes} + {b bytes} = {total bytes} bytes
Program A:
a code
Program B:
b code
Program C:
c code
Source:
# Language A/Language B, <a bytes> + <b bytes> = <total bytes> bytes
Program A:
a code
Program B:
b code
Program C:
c code
- None of these programs should take input.
- Different versions of the same language do count as different languages. (although this is discouraged because it leads to boring solutions)
- Languages A and B must be distinct.
- You must not read your own source code from a file. Programs may not be empty
- Standard loopholes apply.
Hints
- C++ and [Python/Bash/other
#
commented languages] are good combos because you can define macros that one language can ignore
This is code-golf, so the smallest sum of the byte counts Program A and B wins.
Wrong language!
be output in any form (i.e. all caps, all lowercase, etc.)? \$\endgroup\$