摘要:
// 练习:使用选择法对字符串按字典序排序 #include <stdio.h> #include<string.h> const int N = 5; void selectSort(char str[][20], int n ); // 函数声明,形参str是二维数组名 int main() { 阅读全文
摘要:
#include <stdio.h> int main(){ int n,sum,x,y; sum=1; x=1; y=2; scanf("%d",&n); do { sum +=y; y=y*2; x++; }while(x<=n); printf("n=%d时,sum=%d\n",n,sum); 阅读全文