// Program: ex1d_template.cpp // Author: ... #include // PRE: [begin, end) is a valid range // POST: returns the length of the longest non-decreasing subrange // in [begin, end) unsigned int longest_nondecr_subrange (const int* begin, const int* end) { // [Your code ...] } int main () { // Input const unsigned int len = 20; int nbrs[len]; std::cout << "Input " << len << " numbers: "; for (int* i = nbrs; i < nbrs + len; ++i) std::cin >> *i; // Output std::cout << "Length of longest non-decreasing subrange: " << longest_nondecr_subrange(nbrs, nbrs + len) << "\n"; return 0; }