Website Summary Files Commits Branches @commit @diff @stats
path: root / pract_SI / Pract. 09 / task4.cpp
blob: d89c934811cb325d9b56e4dba2f8d4d3f7bc92d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
bool Is_monotonically_increasing(const float* seq,int length,int position)
{
   if(position==length-1)
   return true;
   if(seq[position]>seq[position+1]) return false;
   return Is_monotonically_increasing(seq,length,position+1);
}

bool Is_rising(const float* seq,int Size)
{
    if(Size<2) return true;
    if(seq>(seq+1)) return false;
  ///  if(seq[0]>seq[1]) return false; -same
    return Is_rising(++seq,Size-1);
}