1st STL program (six)

xiaoxiao2021-03-06  49

#include

#include

#include

Using namespace std;

Void main (void)

{

Vector Num; // STL VECTOR container

Int element;

// Read the integer from the standard input device,

/ / Until the input is not integrity data

While (CIN >> ELEMENT)

Num.push_back (element);

Sampling algorithm in // STL

sort (Num.begin (), Num.end ());

// output the sort result to the standard output device

For (int i = 0; i

COUT << NUM [i] << "/ n";

}

转载请注明原文地址:https://www.9cbs.com/read-110384.html

New Post(0)