Given the following code, what logic would you need to include to print all even values stored within the array:
int[] myArray = {1,2,38,4,54,6,7,8,9,10};
for (int i = 0; i < myArray.length; i++) {
//your code goes here
}
NOTE: Your response should be just the missing logic--not the entire problem set.
The missing logic whigh would allow all the even numbers stored within the array to be printed is if(myArray[i]%2 == 0)
Even numbers are divisible by 2, and hence, will leave no remainder when divided by 2. Using the modulo operator, each iterated value in the array should be checked if it has a remainder of 0, when divided by 2.Hence, if the remainder is 0, then the value is even and the value should be printed.
Learn more : https://brainly.com/question/17330574
three types of query​
It is commonly accepted that there are three different types of search queries:
Navigational search queries.
Informational search queries.
Transactional search queries.
Which two wireless technologies are used in IoT?
Answer:
If you like my answer you can put me in brainlist.
Explanation:
LPWANs. Low Power Wide Area Networks (LPWANs) are the recent development specifically designed for the requirements for IoT. ...
Cellular (4G and 5G) ...
Zigbee and Other Mesh Protocols. ...
Bluetooth and BLE. ...
Wi-Fi. ...
RFID.
Hope this is helpful to you.....