摘要: // SS.cpp : Defines the entry point for the console application.//#include "stdio.h"#include "string.h"#define N 10int findStr(char str[],char pat[]);void allSubPat(char str[],char pat[]);void clrFind(char str[]);int main(){ char s1[10]="12abc78"; char s2[10]="7abc 阅读全文
posted @ 2013-03-27 22:48 cart55free99 阅读(164) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#define N 7int main(){ //求阶乘和 int sum=0; int item=1;//每一项的值 int i=1; for(;i<N;i++){ int j=1; item=1; for( ;j<=i;j++ ){ item=item*j;// 想想阶乘的由来:第三项是 1*2*3 } printf("%d ",item); sum+=item; } //求Fibonacci的前... 阅读全文
posted @ 2013-03-27 14:05 cart55free99 阅读(276) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <string.h>#include <stdlib.h> //stdlib.h 包括了malloc.h#define N 17typedef struct Node{ int data; struct Node * next;}Node;Node * add21Node(Node * first);Node * delNode(Node * start);int main(){ Node *first=(Node *)malloc(sizeof(Node)); first->data=1; fir 阅读全文
posted @ 2013-03-27 08:10 cart55free99 阅读(187) 评论(0) 推荐(0) 编辑