Блог пользователя seadoglee

Автор seadoglee, история, 2 года назад, По-английски

Since the last task of april fools contest is quite simple (comparing to other tasks), so on top of just making the program executable, I will try to output Hello world, with the combination of different language.

Original task:
Pascal & C++

//\
begin write('Hello world')end.(*
#include<iostream>
int main(){std::cout<<"Hello world*){";}

Python & C++

#//\
print('Hello world')
#include<iostream>/*
'''*/
int main(){std::cout<<"Hello world";}
//'''

C & C++
just kidding

Java & C++

//\
public class Main{ public static void main(String[] args){System.out.println("Hello World");}}/*
#include<iostream>
int main(){std::cout<<"Hello world*///";}

Chinese & English:

屌你世界
Hello world


Thank you for reading this post april fools shitpost. I thought of writing code that is executable in c++, python and pascal, but have no idea to fix the comment problem.
Feel free to share your idea.

  • Проголосовать: нравится
  • +7
  • Проголосовать: не нравится

»
2 года назад, # |
  Проголосовать: нравится +14 Проголосовать: не нравится

The Chinese one though...

»
2 года назад, # |
  Проголосовать: нравится +14 Проголосовать: не нравится

How do I write a multi-line comment in Chinese?

  • »
    »
    2 года назад, # ^ |
      Проголосовать: нравится +27 Проголосовать: не нравится

    My teacher usually use red ball pen to write multi-line comment in Chinese, and you can do so?

»
2 года назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

Just for the record, programs like these are called polyglots and are actually used in practice, mostly when you want to use several languages at once while only using a single file.