- 博客(4)
- 收藏
- 关注
原创 C语言没有引用
被数据结构坑了```typedef struct Pnode /*用单链表存储多项式的结点结构*/{ double dbCoef; //多项式的系数 int nExp; //指数 struct Pnode* next; //指向下一节点的指针}Pnode, *Plink;```想要创建一个空指针 书上是这么做的void creatl
2016-03-24 08:34:36
1005
1
原创 判断一个数是否能分解为某个连续正整数序列之和
#include <stdio.h>void fun( int n ){ int j, b, c, m, flag=0; for (b=1; b<=n/2; b++) { m = n; c = b; while (m !=0 && m>=c) { m = m - c; c++; } if ( m=
2016-03-19 20:32:39
1348
原创 do while
do{ printf("%d\n",x-=2); }while(!(--x) );do while和while的判定一样,while()表达式是否为真 while(!(–x) )相当于while((–x) == 0) while((–x) )相当于while((–x) != 0)
2016-03-19 09:44:17
340
原创 从字符串转换到数字。
long fun( char *s ){ int i,n; long a,r; a=0; r=0; n=strlen(s); for(i=n-1;i>=0;i--) { a=*(s+i)-48; r=r*10+a; } return r;}main(){ char s[10]; long r
2016-03-19 09:33:04
327
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人