随笔分类 -  杭电2000—2099

杭电2001
摘要:#include<stdio.h>#include<string.h>#include<stdlib.h>#include<math.h>int main(){ double x1,x2,y1,y2,s; while(scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2)!=EOF) { s=sqrt(((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))); printf("%.2lf\n",s); } // system("pau 阅读全文
posted @ 2011-07-15 17:50 枫叶飘泪 阅读(466) 评论(0) 推荐(0)
杭电2000
摘要:#include<stdio.h>#include<string.h>#include<stdlib.h>int cmp(const void *a,const void *b){ return *(char *)a-*(char *)b;}int main(){ char a[3]; while(scanf("%s",a)!=EOF) { qsort(a,3,sizeof(a[0]),cmp); printf("%c %c %c\n",a[0],a[1],a[2]); } //system("pause&q 阅读全文
posted @ 2011-07-15 17:32 枫叶飘泪 阅读(448) 评论(0) 推荐(0)