Advertisement
Guest User

Untitled

a guest
Nov 17th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.56 KB | None | 0 0
  1. const int part = 5;
  2. int partLength = (int)ceil(1000 / (float)part);
  3. for (int i = 0;i<partLength ;i++){
  4.     class a1 = array[i];
  5.     if (a1.condition == condition) break;
  6.  
  7.     int i2 = i + partLength;
  8.     class a2 = array[i2];
  9.     if (a2.condition == condition) break;
  10.  
  11.     int i3 = i2 + partLength;
  12.     class a3 = array[i3];
  13.     if (a3.condition == condition) break;
  14.  
  15.     int i4 = i3 + partLength;
  16.     class a4 = array[i4];
  17.     if (a4.condition == condition) break;
  18.  
  19.     int i5 = i4 + partLength;
  20.     if (i5 < 1000) {
  21.         class a5 = array[i5];
  22.         if (a5.condition == condition) break;
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement