干!
干! is the Chinese version of I fuck, you fuck, and is designed by PSTF.
Commands
Variable Definition
有个叫 X 的大混账
Define and initialize X. Any variable is assigned a value of 0 at the beginning.
Increment and Decrement
我操了 X
Set X to the value of X+1.
我淦了 X
Set X to the value of X-1.
In the original version, values less than 0 are treated as 0, but in this programming language, we introduce negative numbers and decimals.
I/O
你操了 X
Enter an integer and assign it to X. If a decimal point is detected, X will be a decimal. Read until a whitespace character, including EOF.
你又操了 X
Enter a character and assign its code point to X.
X 操了你
Directly output the value of X. If the value is a decimal but has no fractional part, treat it as an integer.
X 又操了你
Convert the value of X into the corresponding Unicode character according to the character mapping table (version 15.0.0) and output it. If the resulting character code point is invalid, nothing will be output, and a ValueError will be raised.
Termination
操你妈
Exit the program immediately.
Arithmetic
X 操了 Y
Set Y to the value of X + Y.
X 又操了 Y
Set Y to the value of XY.
X 操了 Y 一遍又一遍
Set Y to the value of XY.
X 不停地操 Y
Set Y to the value of YX. This is very unuseful because it leads into a horribly large value.
X 把 Y 操死了
Set Y to the value of Y√X.
X 淦了 Y
Set Y to the value of X - Y.
X 又淦了 Y
Set Y to the value of X/Y.
X 淦了 Y 一遍又一遍
Set Y to the value of X/Y, and round toward 0.
X 不停地淦 Y
Set Y to the value of X mod Y.
X 把 Y 操活了
Set Y to the value of logX(Y). If Y is less than or equal to 0, throw a MathError.
Comment
操!:Anything goes here
This line will be ignored.
Logical
大傻逼 means True, 小傻逼 means False.
Control Flow
Control flow
While loop
只要 X 被操过 CODE 没了
While X is not zero, do CODE.
只要 X 没被操过 CODE 没了
While X is zero, do CODE.
只要 X 比 Y 多操了几遍 CODE 没了
While X is greater than Y, do CODE.
只要 X 比 Y 少操了几遍 CODE 没了
While X is less than Y, do CODE.
Conditonal statement
It is like the While loop, just replace the 只要 with 如果.
The if-else statement is allowed:
Any if statement CODE1 否则 CODE2 没了
Assignment
X 被操了 Y 回
Assign X to Y.
String Output
囸 『Anything goes here』
Output a specified string with the escape same as C++.
Example Programs
A + B Problem
有个叫 A 的大混账 你操了 A 有个叫 B 的大混账 你操了 B A 操了 B B 操了你 操你妈