- 博客(2)
- 收藏
- 关注
原创 字符串数组排序
#include<stdio.h> #include<string.h> void swap(char *a,char *b) { char temp[30]; strcpy(temp,a); strcpy(a,b); strcpy(b,temp); } void main() { char str[][30]={“turbo c”,“turbo br”,“dbase”,“...
2020-02-11 20:19:36
147
原创 有n个数,使前面各数顺序向后移m个位置,最后m个数变成最前面m个数
#include<stdio.h> void move(int *arr,int n,int m) { int i,j,temp,k=0; for(i=n-m;i<n;i++) { temp=arr[i]; for(j=i-1;j>=k;j–) { arr[j+1]=arr[j]; } arr[k++]=temp; } } void main() { int a[20]; ...
2020-02-11 20:16:01
400
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅