|
在天涯上看到有人发汉语编程的帖子。然后到网上一搜。很多搞笑的程序出现了。跃跃欲试啊。自己写了个。只是实现了个很简单的功能。由于比较晚了。懒的写哪么复杂。
头文件。。
/*****
******/
#include<IOStream>
#include<string>
using namespace std;
#define 函数开始了 {
#define 函数结束了 }
#define 循环开始了 {
#define 循环结束了 }
#define 已知循环 for
#define 后未知循环 while
#define 控制条件写在这里 (
#define 控制条件结束了 )
#define 本语句结束 ;
#define 函数参数写在这里 (
#define 函数参数结束了 )
typedef int 整形;
#define 字符串 string
#define 小数 double
#define 静态变量 static
#define 输出 <<
#define 输入 >>
#define 屏幕 cout
#define 键盘 cin
//#define 包含文件 include
//#define 单引号 '
//#define 双引号 "
#define 大于 >
#define 小于 <
#define 左书名号 <
#define 有书名号 >
#define 等于 =
#define 不等于 !=
#define 大于等于 >=
#define 小于等于 <=
#define 加 +
#define 减 -
#define 乘 *
#define 除 /
#define 递减 --
#define 递加 ++
#define 类 class
#define 类开始了 {
#define 类完蛋了 }
#define 私有财产 private
#define 公共财产 public
#define 的 ::
#define 自己 this
#define 住址 &
#define 内容物 *
#define 持有的 ->
#define 左移动 <<
#define 右移动 >>
typedef void 没有返回值的函数;
typedef void 没有参数的;
#define 由系统调用的函数 main
#define 返回 return
#define 零 0
/****实现文件*****/
#include"hanyun.h"
没有返回值的函数 叫我 函数参数写在这里 函数参数结束了
函数开始了
屏幕 输出 "你好我的世界!!!" 本语句结束
屏幕 输出 "谢谢观赏!!!" 本语句结束
函数结束了
整形 由系统调用的函数 函数参数写在这里 函数参数结束了
函数开始了
叫我 函数参数写在这里 函数参数结束了 本语句结束
整形 变量 本语句结束
键盘 输入 变量 本语句结束
返回 零 本语句结束
函数结束了
/*****结束了*******/
本例在visaul studio 2008 中正常运行,支持中文函数名。比较强的。哈哈。。。。 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|