Skip to content

Instantly share code, notes, and snippets.

@EReeves
Created October 14, 2016 15:47
Show Gist options
  • Save EReeves/d3fcd4f6432185ec39044e2067af7b3f to your computer and use it in GitHub Desktop.
Save EReeves/d3fcd4f6432185ec39044e2067af7b3f to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
char* words[500];
int ctr = 0;
int main() {
system("chcp 65001"); //Allow Chinese display.
printf("\nC语言我来了");
ShengCi("\nInterface Terms:");
ShengCi(" 桌面, zhuomian 14, Desktop, 名词");
ShengCi(" 菜单栏, caidanlan 412, Menu bar, 名词");
ShengCi(" 视窗, shichuang 41, Window, 名词");
ShengCi(" 键, jian 4, Key, 名词");
ShengCi(" 双击, shuangji 11, Double-Click, 动词");
ShengCi(" 右键单击, youjiandanji 4411, Right-Click, 动词"); //左击 右击
ShengCi("\n关于电脑编程的: ");
ShengCi(" 编程, biancheng 12, Programming, 动宾结构"); //编程序
ShengCi(" 程序, chengxu 24, Program, 名词");
ShengCi(" 代码, daima 43, Code, 名词");
ShengCi(" 命令, mingling 44, Command, 名词");
ShengCi(" 括号, kuohao 44, Parenthesis (), 名词");
ShengCi(" 花括号, huakuohao 144, curly braces {}, 名词");
ShengCi(" 引号, yinhao 34, Quotation marks \"\", 名词"); //Can say 双引号 for two - ""
ShengCi(" 函数, hanshu 24, Function, 名词");
ShengCi(" 表达式, biaodashi 324, Expression, 名词");
ShengCi(" 比较, can be used to describe a conditional statement");
ShengCi(" 条件, tiaojian 24, condition, 名词");
ShengCi(" 判断, panduan 44, judge, 动词");
ShengCi(" 逻辑运算, luojiyunsuan 2544, Comparison operator || && etc, 名词"); //逻辑 logic
ShengCi(" 运算, yunsuan 44, Operation, 名词");
ShengCi(" 运算符, yunsuanfu 442, Operator, 名词");
ShengCi(" >(大于)、<(小于)、==(等于)、>=(大于等于)、<=(小于等于)、!=(不等于)"); //Should study maths in Chinese.
ShengCi(" 整数, zhengshu 34 integer, 名词");
ShengCi(" 负数, fushu 44 negative number, 名词");
ShengCi(" 注释, zhushi 44, Comment, 名词");
ShengCi(" 引用, yinyong 34, Reference, 动词");
ShengCi(" 头文件, header 224, Header File, 名词");
ShengCi(" 格式, geshi 24, Format, 名词");
ShengCi(" 存储, cunchu 23, Store, 动词");
ShengCi(" 变量, bianliang 44, Variable, 名词"); //名字 is generally used for names, e.g. 变量的名字
ShengCi(" 数据, shuju 44, numbers/data, 名词");
ShengCi(" 声明, shengming 12, declaration, 名词");
ShengCi(" 打印, 34, can also be used for printing to output, not just paper print.");
ShengCi(" 初始化, chushihua 134, initialisation e.g. 变量的初始化, 名词");
ShengCi(" 加减乘除, jiajianchengchu 1322, base 4 arithmetic operations + - * /, 名词"); //Should know this already.
ShengCi(" 合法, legal, can be used to describe legal code too.");
KanShengCi();
return 0;
}
void ShengCi(char* str){
words[++ctr] = str;
}
void KanShengCi() {
printf("新词汇: \n");
for(int i=0; i<=ctr;i++) {
printf(words[i]);
printf("\n");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment