markdown -- 易读易写
<table>
<tr>
<td>Foo</td>
</tr>
</table>
this is an H1
this is an H2
ps. = 表示 最高阶标题, - 表示低价标题
这是h1
这是 h2
这是 h3
####### 这是 h6
1. 区块 引用 blockquotes
this is a blockquotes with two paragrahps
contsectesure
第二段
嵌套
第三层嵌套
注意:引用的区块也可以使用其他的markdown的语法
2.列表
markdown支持有序列表以及无序列表
- red
- green
- blue
- red
- greeen
- blue
- bird
- mchale
- parish
这是一个普通段落:
这是一个代码区块
<pre>
<code>
/*
- 二叉树.cpp
- Created on: 2016年8月2日
Author: Administrator
*/
include<stdlib.h>
include<iostream>
using namespace std;
typedef struct Btree{
int data;
Btree * left;
Btree * right;
}Btree;
Btree * BT;
void Btreeinit(Btree* *h){
*h=NULL;
return;
};
int Btreeempty(Btree * bt){
if(bt==NULL){
return 1;
}
return 0;
}
int BTreeDepth(Btree bt)
{
if(bt == NULL)
{
return 0;
}
else
{
int d1 = BTreeDepth(bt->left);
int d2 = BTreeDepth(bt->right);
return (d1>d2?d1:d2)+1;
}
}
void LeftInsert(Btree bt1,int n){
if(bt1==NULL){
cerr<<"bt1 is null"<<endl;
exit(-1);
}
Btree p=new Btree;
p->data=n;
p->left=NULL;
p->right=NULL;
bt1->left=p;
}
void RightInsert(Btree bt1,int n){
if(bt1==NULL){
cerr<<"bt1 is null"<<endl;
exit(-1);
}
Btree p=new Btree;
p->data=n;
p->left=NULL;
p->right=NULL;
bt1->right=p;
}
//先序遍历
void Before(Btree * bt){
if(bt==NULL){
return;
}
cout<<bt->data<<endl;
Before(bt->left);
Before(bt->right);
}
//中序遍历
void Midder(Btree * bt){
if(bt==NULL){
return;
}
Midder(bt->left);
cout<<bt->data<<endl;
Midder(bt->right);
}
//后序遍历
void After(Btree * bt){
if(bt==NULL){
return;
}
After(bt->left);
After(bt->right);
cout<<bt->data<<endl;
}
/
1
2 3
4 5
6
*/
int main()
{
Btreeinit(&BT);
BT = new Btree;
BT->data=1;
BT->left=NULL;
BT->right=NULL;
LeftInsert(BT,2);
RightInsert(BT,3);
LeftInsert(BT->left,4);
RightInsert(BT->left,5);
RightInsert(BT->left->left,6);
cout<<Btreeempty(BT)<<endl;
cout<<BTreeDepth(BT)<<endl;
Before(BT);
cout<<endl;
After(BT);
cout<<endl;
Midder(BT);
cout<<"hello world";
return 0;
}
</code>
</pre>
以上是我自己写着玩的, 如果大家想要了解更详细:还是看看这篇文件吧
http://wowubuntu.com/markdown/