update
This commit is contained in:
+2
-1
@@ -47,7 +47,8 @@ BinaryTreeNode *m_pLeft; // left child of node
|
|||||||
BinaryTreeNode *m_pRight; // right child of node
|
BinaryTreeNode *m_pRight; // right child of node
|
||||||
};
|
};
|
||||||
|
|
||||||
1. 累加当前节点,
|
1. 累加当前节点,累加和大于给定值
|
||||||
|
2. 不为叶节点,左子树入栈
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,3 +9,9 @@
|
|||||||
printf("%s\n",dummy);
|
printf("%s\n",dummy);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
输入一个串,以字符'a'结尾
|
||||||
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,18 @@
|
|||||||
int a=3, b = 5;
|
int a=3, b = 5;
|
||||||
|
|
||||||
printf(&a["Ya!Hello! how is this? %s\n"], &b["junk/super"]);
|
printf(&a["Ya!Hello! how is this? %s\n"], &b["junk/super"]);
|
||||||
|
|
||||||
|
//printf(3["helloworld \n"]);
|
||||||
|
|
||||||
|
printf("%c\n", 0["this"] );
|
||||||
|
|
||||||
printf(&a["WHAT%c%c%c %c%c %c !\n"], 1["this"],
|
printf(&a["WHAT%c%c%c %c%c %c !\n"], 1["this"],
|
||||||
2["beauty"],0["tool"],0["is"],3["sensitive"],4["CCCCCC"]);
|
2["beauty"],0["tool"],0["is"],3["sensitive"],4["CCCCCC"]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
+3
-7
@@ -3,11 +3,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
char str[80];
|
|
||||||
scanf("%[^/n]",str);
|
|
||||||
printf("%s\n",str);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
char c;
|
char c;
|
||||||
scanf("%c",&c);
|
scanf("%c",&c);
|
||||||
@@ -24,8 +19,9 @@
|
|||||||
scanf("%c",&c) 和 scanf(" %c",&c) 区别
|
scanf("%c",&c) 和 scanf(" %c",&c) 区别
|
||||||
|
|
||||||
|
|
||||||
|
使用第二个scanf("%c",&c) 时,系统会将前一个scanf()输入的回车符号读入改变量。
|
||||||
|
这里为什么加一个“空格”就可以?
|
||||||
|
scanf带“空格”后,会从输入缓冲区中skip 空白符(空格、tab,换行符),读取一个字符
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
int main()
|
||||||
|
{
|
||||||
|
char ch1;
|
||||||
|
char ch2;
|
||||||
|
ch1 = getchar();
|
||||||
|
ch2 = getchar();
|
||||||
|
printf("%d %d", ch1, ch2);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
+2
-3
@@ -7,9 +7,8 @@
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
printf("%s\n",h(f(1,2))); //
|
||||||
printf("%s\n",h(f(1,2)));
|
printf("%s\n",g(f(1,2))); // f(1,2)
|
||||||
//printf("%s\n",g(f(1,2)));
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user