字符串排序
来源:互联网 发布:15后男女比例真实数据 编辑:程序博客网 时间:2024/06/17 00:49
#include<stdio.h>#include<string.h>void main(){ char *str[5]={"Asd","Bui","ERT","DBn","CPOi"}; char s[10]; int i,j; for(i=0;i<4;i++) { for(j=i+1;j<5;j++) { if(strcmp(str[i],str[j])>0) { strcpy(s,str[i]); strcpy(str[i],str[j]); strcpy(str[j],s); } } } for(i=0;i<5;i++) printf("%s ",str[i]);}
0 0
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序。
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序
- 字符串排序
- 排序字符串
- Docker mysql 把数据存储在本地目录
- activity显示软键盘问题
- [LeetCode]String to Integer (atoi)
- iOS 9系统策略更新,使用微信SDK的开发者注意升级
- Android 开发第三弹:自定义左右菜单(滑动动画+蒙版效果)
- 字符串排序
- Fragment的使用
- android 5.0系统 Service Intent must be explicit
- slice operation of consequence in python
- Linux各种企业客户操作系统平台
- cocos2d-x设计模式发掘之一:单例模式
- NYOJ 1036 非洲小孩 (贪心)
- unity3d android打包中的class , .layout not found 等的问题研究
- ios-锁机制-条件锁的使用