SHARE
TWEET

Untitled

a guest Oct 21st, 2017 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int counter = 0;
  2.     int counterMax = 0;
  3.     int indexBegin = 0;
  4.     int indexMax = 0;
  5.  
  6.     for (int i = 0; i < Array.length - 1; i++)
  7.       {
  8.  
  9.     if (Array[i] < Array[i + 1])
  10.       {
  11.         counter++;
  12.  
  13.         if (counter == 1)
  14.           {
  15.         indexBegin = i;
  16.           }
  17.  
  18.       }
  19.     if (counterMax < counter)
  20.       {
  21.         counterMax = counter;
  22.         indexMax = indexBegin;
  23.       }
  24.     if (Array[i] >= Array[i + 1])
  25.       {
  26.         counter = 0;
  27.       }
  28.  
  29.       }
  30.     return indexMax;
RAW Paste Data
Top