Guest User

Untitled

a guest
Feb 21st, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public boolean unlucky1(int[] nums)
  2. {
  3.     boolean bResult = false;
  4.    
  5.     for (int index = 0; index < nums.length - 1; ++index)
  6.     {
  7.         if ((nums[index] == 1) && (nums[index + 1] == 3))
  8.         {
  9.             bResult = true;
  10.         }
  11.     }
  12.    
  13.     if ((nums.length == 5) && (nums[nums.length - 2] == 3))
  14.     {
  15.         bResult = false;
  16.     }
  17.    
  18.     return bResult;
  19. }
Add Comment
Please, Sign In to add comment