ZIP李涛第5次作业.zip 2.01KB

2403_88313188

资源文件列表:

李涛第5次作业.zip 大约有5个文件
  1. 1.cpp 776B
  2. 2.cpp 617B
  3. 3.cpp 375B
  4. 4.cpp 753B
  5. 5.cpp 447B

资源介绍:

李涛第5次作业.zip
#include <stdio.h> #include <string.h> #define SIZE 10 void bubbleSort(char names[SIZE][50], int n) { int i, j; for (i = 0; i < n - 1; i++) { for (j = 0; j < n - i - 1; j++) { if (strcmp(names[j], names[j + 1]) > 0) { char temp[50]; strcpy(temp, names[j]); strcpy(names[j], names[j + 1]); strcpy(names[j + 1], temp); } } } } int main() { char names[SIZE][50]; printf("请输入10个学生的姓名:\n"); for (int i = 0; i < SIZE; i++) { scanf("%s", names[i]); } bubbleSort(names, SIZE); printf("排序后的姓名:\n"); for (int i = 0; i < SIZE; i++) { printf("%s ", names[i]); } return 0; }
100+评论
captcha
    类型标题大小时间
    ZIP计算机安全Ⅰ实验:利用 oledump.py 分析工具提取宏代码夺旗2.44MB5月前
    ZIP计算机安全Ⅰ实验报告3.2:VBA+CDO发送邮件2.15MB5月前
    ZIPqtmgtt-5.14.2源码329.69KB5月前
    ZIP参考zh.hans ERouting-sLM-v40.pdf 中实验教程,免费无需多言11.4MB5月前
    ZIP【微信小程序源码期末大作业毕业设计】仿ofo共享单车小程序-小程序项目源码.zip2.28MB5月前
    ZIP【微信小程序源码期末大作业毕业设计】仿美团外卖小程序-小程序项目源码.zip853.6KB5月前
    ZIP(源码)基于Linux系统编程手册的时间与文件操作项目.zip3.16MB5月前
    ZIPSQLServer 对 SQL 标准的支持情况5.14MB5月前