摘要:转载自:http://www.examw.com/biancheng/c/194822/#include #include #include #define ACC 0.000000001double newSqrt(double n){ double low, high, mid, tmp; if...
阅读全文
摘要:#include typedef struct listnode { int f; struct listnode *next;} ListNode;ListNode *sort(ListNode *head){ ListNode *p,*p1,*p2,*p3; ListNo...
阅读全文
摘要:#include #include char *mystrstr(char *s1, char *s2){ int i; if (*s2) { while(*s1) { for(i = 0; *(s1+i) == *(s2+i); i++) { if(!*(s2+i+1)) ...
阅读全文
摘要:#include #include //查找该元素是否已经存在int find(char t[],int len,char ch){ int i; for(i = 0; i < len; i++) { if (t[i] == ch) { return 1; } } return 0;}ch...
阅读全文
摘要:#include #include struct node{ int data; struct node *next;};typedef struct node NODE;typedef struct node * PNODE;PNODE constructlist( PNODE head,...
阅读全文
摘要:#include #include void delChar(char *s, char ch){ int i,j; int len = strlen(s); for(i = 0; i < len; i++) { if(s[i] == ch) { for(j = i; j < len; ...
阅读全文
摘要:#include int main(){ int i; unsigned int j; char input[ ]="10 0x1b aaaaaaaa bbbbbbbb"; char s[5]; sscanf(input,"%d %x %5[a-z] %*s %f",...
阅读全文
摘要:#include int Search(char *s1, char *s2) { char *temp = s1; int count = 0; while(*temp != '\0') { char *tmp1 = temp; char *t1 = s2; while(*t1 != '\0...
阅读全文
摘要:#include int strend(char *s , char *t) { char *temp = s; while(*temp != '\0') { char *tmp1 = temp; char *t1 = t; while(*t1 != '\0' && *tmp1 != '\...
阅读全文
摘要:#include int main(){int n;int i,j;printf("输入金字塔层数:"); scanf("%d",&n);for(i=1;i=1;--j)printf(" %d", j);printf("\n");}return 0;}
阅读全文
摘要:1 #include 2 #include 3 struct Student 4 { 5 int num; //学号 6 int total; //总分 7 char name[20]; //姓名 8 float score[3]; //3个课目的分数 9 };1...
阅读全文
摘要:1 #include 2 #include 3 #include 4 typedef struct list{ 5 struct list *next; 6 char name[30];//用户名称 7 char addr[50];//地址 8 ch...
阅读全文
摘要:1 #include 2 int main() 3 { 4 int i,j; 5 //左下角。 6 for (i=1;i=j) printf("%d×%d=%-2d ",j,i,j*i); 10 putchar('\n');11 }12 //左上角。13 putchar('\n...
阅读全文
摘要:1 #include 2 #include 3 #include 4 void writefile() 5 { 6 FILE *fp; 7 fp = fopen("e://ss.txt","w+"); 8 if(fp == NULL) 9 {10 ...
阅读全文
摘要:1 #include 2 #include 3 int main() 4 { 5 int i=2, a=100, flag=0; 6 for (a=100;a<=1000;a++) 7 { 8 flag=0; 9 i= 2;10 ...
阅读全文
摘要:1 #include 2 #include 3 #include 4 #include 5 //#include 6 // 7 //#include 8 //using namespace std; 9 10 #include 11 12 char temp[50] = "";13 14 v...
阅读全文