int numbers[11] = {1, 10, 0, 2, 9, 3, 8, 4, 7, 5, 6};
int n = 0, sum = 0;

do{
   if (numbers[n] > 6)
      continue;
   sum = sum + numbers[n];
} while (n++ < 11 && sum < 15);

NSLog(@"Pierwsze %d liczb pozwala na otrzymanie sumy %d", n, sum);
