摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int main(void) 5 { 6 int n; 7 double *p; 8 scanf("%d", &n); 9 10 p = (double *)calloc(n, sizeof(double) 阅读全文
posted @ 2019-12-20 16:26 jason2018 阅读(630) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #include <string.h> 3 4 int main(void) 5 { 6 char str[5][80]; //二维数组保存5个字符串 7 int i, j; 8 9 for (i = 0; i < 5; i++) 10 { 11 sca 阅读全文
posted @ 2019-12-20 15:01 jason2018 阅读(1183) 评论(0) 推荐(0) 编辑
摘要: 1 void StringCount(char* s) 2 { 3 int len = 0; 4 char* p = s; 5 int cap_letter = 0; 6 int sma_letter = 0; 7 int space = 0; 8 int digit = 0; 9 int othe 阅读全文
posted @ 2019-12-20 12:40 jason2018 阅读(1078) 评论(0) 推荐(0) 编辑
摘要: 1 void delchar(char *str, char c) 2 { 3 int i, j; 4 char a[MAXN]; 5 6 j = 0; 7 for (i = 0; str[i] != '\0'; i++) 8 { 9 if (str[i] != c) 10 { 11 a[j] = 阅读全文
posted @ 2019-12-20 12:18 jason2018 阅读(770) 评论(0) 推荐(0) 编辑
摘要: 1 void strmcpy(char *t, int m, char *s) 2 { 3 int len = 0; //计算字符串t的长度 4 char *p = t; 5 int i; 6 while (*p != '\0') 7 { 8 len++; 9 p++; 10 } 11 12 if 阅读全文
posted @ 2019-12-20 11:59 jason2018 阅读(2710) 评论(0) 推荐(0) 编辑
摘要: 1 void CountOff(int n, int m, int out[]) 2 { 3 4 int person[n + 1]; 5 int i; 6 int count; 7 8 /* 9 给编号1到n的人打上标签 10 =0在圈子中 11 =1退出圈子 12 */ 13 for (i = 阅读全文
posted @ 2019-12-20 10:47 jason2018 阅读(334) 评论(0) 推荐(0) 编辑