摘要: #include<iostream> using namespace std; #include<string> //结构体数组 struct hero { string name; int age; string sex; }; void bubblesort(hero arr[],int len 阅读全文
posted @ 2020-03-11 23:55 Jackie_Wang 阅读(891) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; #include<string> //结构体数组 struct student { string name; int age; float score; }; int main() { struct student st 阅读全文
posted @ 2020-03-10 23:24 Jackie_Wang 阅读(2691) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; void bubbleArr(int *arr,int len) { for (int i = 0; i < len - 1; i++) { for (int j = 0; j < len - i - 1; j++) { 阅读全文
posted @ 2020-03-10 22:52 Jackie_Wang 阅读(1662) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; #include<string> #include<ctime> int main() { //成绩统计 int scores[3][3] = { {100,100,100}, {90,50,100}, {60,70,8 阅读全文
posted @ 2020-02-29 23:29 Jackie_Wang 阅读(1826) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; #include<string> #include<ctime> int main() { //冒泡排序法 int arr[10] = { 3,5,6,4,2,9,8,1,7,0 }; cout << "排序前的数组为: 阅读全文
posted @ 2020-02-29 20:53 Jackie_Wang 阅读(3285) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; #include<string> #include<ctime> int main() { //数组元素的逆置 int arr[5] = { 1,5,3,2,4 }; int start = 0; int end = s 阅读全文
posted @ 2020-02-29 20:25 Jackie_Wang 阅读(485) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; #include<string> #include<ctime> int main() { //五只小猪称体重 int arr[5] = { 300,350,200,400,250 }; int min ; int n= 阅读全文
posted @ 2020-02-29 15:35 Jackie_Wang 阅读(511) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; #include<string> #include<ctime> int main() { //goto语句 cout << "1.xxxxxx" << endl; cout << "2.xxxxxx" << endl; 阅读全文
posted @ 2020-02-29 14:17 Jackie_Wang 阅读(190) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; #include<string> #include<ctime> int main() { //乘法口诀表 for (int j=1; j < 10; j++) { for (int i = 1; i <= j; i++ 阅读全文
posted @ 2020-02-29 14:00 Jackie_Wang 阅读(1015) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; #include<string> #include<ctime> int main() { //嵌套循环打印星图 for (int j = 0; j < 10; j++) { for (int i = 0; i < 10 阅读全文
posted @ 2020-02-29 13:44 Jackie_Wang 阅读(691) 评论(0) 推荐(0) 编辑