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

while (sum < 15)
{
   sum = sum + numbers[n];
   n = n + 1;
}

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