中文(简体,中国大陆)

From Esolang
Jump to navigation Jump to search

What the he11 did I do?!!!!!!!

中文(简体,中国大陆) is also called Chinese.

I am a Chinese, too.

Syntax

The syntax is coming.

Syntax
Chinese Pseudo-Code
打印 内容 print(something)
读入 内容[,提示为__prompt] input(something[, __prompt])
如果 表达式 则: if(expression)
否则: else
否则 如果 表达式 则: elif(expression)
重复执行 10 次 for(i in range(10))
重复执行直到 条件 不满足 while(expression)
重复执行 while(1)
截止 break
跳过本次循环 continue
返回 0 return 0
定义函数 函数名称(参数) def function_name(*args, **kwargs)
None
错误(假) False
正确(真) True
A等于B a==b
A加B a+b
A且B a&&b
A或者B a||b
etc. etc.

Programs

Hello, world

打印 "Hello, world! [换行]"

A+B Problem

定义 甲,乙,丙 为 整数
读入 甲
读入 乙
丙=甲+乙
打印 丙

99 bottles of beers

定义 数量 为 整数, 赋值为 99
定义 单位 为 字符串, 赋值为 "bottles"
重复执行直到 (数量 不等于 0) 不满足
{
    如果 (数量 等于 1) 则: 
    {
        让 单位 变成 "bottle"
    }
    否则:
    {
        让 单位 变成 "bottles"
    }
    打印 "{数量} {单位} of beer on the wall, [换行]{数量} {单位} of beer.[换行]"
    打印 "Take one down, pass it around, [换行]{数量-1} {单位} of beer on the wall. [换行][换行]"
    让 数量 减去 1
    等待 1 秒
}
打印 "No more bottles of beer on the wall, [换行]no more bottles of beer.[换行]"
让 数量 变成 99
打印 "Go to the store and buy some more, [换行]{数量} bottles of beer on the wall.[换行][换行][换行][换行]"

Cat program

定义 字符串1 为字符串
读入 字符串1
打印 字符串1

Truth Machine

定义 甲 为布尔值
输入 甲
如果 非(甲) 则:
    打印 0
否则:
    重复执行直到 (真) 不满足:
        打印 1

Quine

注释:请在此处添加奎因程序的代码。

Print special characters

打印 "[半角引号][半角撇号][制表符号][空字符][Unicode为U+4E00的字符][横翻斜杠][退格]"
注释:U+4E00是“一”字符。


Categories