欢迎来到["czk"]的wiki,这里主要记录各种学习的笔记。不懂什么是wiki?那请看["帮助-新手入门"]
- ["热门新技术"]
- ["Linux"]
- ["Emacs"]
- ["C语言"]
- ["C++语言"]
- ["Python语言"]
- ["Scheme语言"]
- ["数据结构"]
[wiki:ICPC 大学生程序设计竞赛]
- ["计算理论"]
- ["计算机体系结构"]
- ["操作系统"]
- ["English"]
- ["浙大考博题"]
functional programming函数编程: http://www.hibernate.org.cn/viewtopic.php?t=7569&postdays=0&postorder=asc&start=0
- 留言: 有话要说请在此处留言
#include<ctype.h> #include<stdio.h> #include<stdlib.h> int compire(char t[],char s[]) { int i,j; for(i=0;s[i]!='\0'&&s[i]!=t[0];i++); for(j=0;s[i]==t[j]&&t[j]!='\0';j++,i++); if(j>0&&t[j]=='\0') return 0; else return -1; } main(int argc,char *argv[]) { int c; if(argc>=1){ while((c=getchar())!=EOF){ if(compire("tolower",argv[0])==0) putchar(tolower(c)); else if(compire("toupper",argv[0])==0) putchar(toupper(c)); else printf("error"); } } printf("%s",argv[0]); system("pause"); }