摘要: 1 #include<stdio.h> 2 int main() 3 { 4 int n; 5 double t,fenzi=2,fenmu=1; 6 double sum=2,term; 7 scanf("%d",&n); 8 while(n-1){ 9 t=fenzi; 10 fenzi +=f 阅读全文
posted @ 2020-04-04 16:17 陈十 阅读(2365) 评论(1) 推荐(0) 编辑
摘要: 1 char *match( char *s, char ch1, char ch2 ){ 2 int len=0; 3 int m=0; 4 int i=0; 5 while(s[len]){ 6 len++; 7 } 8 9 char t[2*len+1];//防止s字符串全满导致t溢出 10 阅读全文
posted @ 2020-02-16 10:18 陈十 阅读(715) 评论(0) 推荐(0) 编辑
摘要: 1.char *t="\0"; 2.char t[number]=""; 3.char t[number]={'\0'}; 注意不能char *t='\0';这是让t的地址为0,也就是null。 阅读全文
posted @ 2020-02-10 11:24 陈十 阅读(513) 评论(0) 推荐(0) 编辑