12 2021 档案

摘要:源程序: #include <iostream>#include <fstream>using namespace std;int main(){ char c; int num=0; freopen("d:\\test.txt","r",stdin); while(!cin.eof())0 { c 阅读全文
posted @ 2021-12-27 20:01 bobo哥 阅读(31) 评论(0) 推荐(0) 编辑
摘要:源代码: #include <iostream> void QuickSort(int arr[], int start, int end); void swap(int& a, int& b); int main() { int a[] = { 7,12,5,8,4,2,10,15 }; int 阅读全文
posted @ 2021-12-24 23:35 bobo哥 阅读(49) 评论(0) 推荐(0) 编辑
摘要:源程序: def quicksort (array): if len(array) < 2: return array else: pivot = array[0] less = [i for i in array[1: ] if i <= pivot] greater = [i for i in 阅读全文
posted @ 2021-12-24 23:33 bobo哥 阅读(39) 评论(0) 推荐(0) 编辑
摘要:源程序: #include <iostream>using namespace std; class Base{private: int x;public: Base(int a) { x=a; } int getX() { return x; } void show() { cout<<x<<en 阅读全文
posted @ 2021-12-06 20:28 bobo哥 阅读(40) 评论(0) 推荐(0) 编辑
摘要:源程序: #include<iostream>using namespace std; class A{protected: int x;public: A(int a) { x=a; } int get_x() { return x; } void show() { cout<<"x="<<x<< 阅读全文
posted @ 2021-12-05 11:54 bobo哥 阅读(77) 评论(0) 推荐(0) 编辑