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
阅读全文
摘要:源代码: #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
阅读全文
摘要:源程序: 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
阅读全文
摘要:源程序: #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
阅读全文
摘要:源程序: #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<<
阅读全文