# Can someone help me in determining why if construct at line No 17 is not functional in following Solidity code?

``````// SPDX-License-Identifier: MIT

pragma solidity >=0.7.0 <0.9.0;

/**
* @title FourthContract
* @dev Exploring conditionals and loops
*/
contract FourthContract {

uint[] public numbers = [10,20,30,40,50,60,70,80,90,100];

function countOddNumbers() public view returns (uint) {
uint count = 0;

for(uint i = 0; i < numbers.length; i++) {
***if (isOddNumber(numbers[i])) {
count = count + numbers[i];
}***
}
return count;
}

function isOddNumber (uint _number) public view returns(bool) {
if (_number % 2 == 1) {
return true;
}
else {
return false;
}
}
}
``````

here are few tweaks. I've added an odd number to the array because all are even and thus countOddNumbers returns 0.

``````// SPDX-License-Identifier: MIT

pragma solidity >=0.7.0 <0.9.0;

/**
* @title FourthContract
* @dev Exploring conditionals and loops
*/
contract FourthContract {

uint[] public numbers = [10,20,30,40,50,60,70,80,90,100,11];

function countOddNumbers() public view returns (uint) {
uint count = 0;

for(uint i = 0; i < numbers.length; i++) {
if (isOddNumber(numbers[i])) {
count++;
}
}
return count;
}

function isOddNumber (uint _number) public pure returns(bool) {
if (_number % 2 == 1) {
return true;
}
else {
return false;
}
}
}
``````