Difficult# Summing the Numbers in an Integer Array

APCSA-CYVNWG

Which of the following methods will return the sum of all elements in the array that do not have a value between 1 and 10 (both inclusive)?

**I.**

```
public static int sumNumsI(int[ ] nums)
{
int sum=0;
for (int i=0; i<nums.length; i++)
{
if (nums[i]>=1 && nums [i]<=10)
sum +=nums[i];
}
return sum;
}
```

**II.**

```
public static int sumNumsII(int[] nums)
{
int sum=0;
for (int i=0; i<nums.length; i++)
{
if (nums[i]<1 || nums[i]>10 )
sum+=nums[i];
}
return sum;
}
```

**III.**

```
public static int sumNumsIII(int[ ] nums)
{
int sum=0;
for (int i=nums.length-1; i>0; i--)
{
if (nums[i]<1 || nums[i]>10)
sum+=nums[i];
}
return sum;
}
```