⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 select.cpp

📁 这是数据结构、算法与应用-C++语言描述的代码
💻 CPP
字号:
// test select

#include <iostream>
#include <algorithm> // has copy
#include "select.h"

using namespace std;

int main()
{
   int a[10] = {10,7,8,9,4, 2, 3, 6, 5,1};
   int n = 10;

   // output the elements
   cout << "a[0:9] = ";
   copy(a, a+10, ostream_iterator<int>(cout, " "));
   cout << endl;

   // select and output
   for (int i = 1; i <= n; i++)
      cout << "The " << i << "'th element is " << select(a, n, i) << endl;
   return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -