Zoom
ng
array
op
the error text "Execution existed!". (1.0 point)
When input array and choose an option
After clicking the "COUNT" button
Enter an integer array: 1,2,3,4
Choose an option:Odd Even
Result:
COUNT
List of Executions:
Array Option Result
Enter an integer array: 1,2,3,4
Choose an option:Odd Even
Result:
COUNT
Execution existed!
List of Executions:
=>
Array Option Result
1,2,3,4 odd 1,2,3,4 even 2
2
1,2,3,4 odd 2
1,2,3,4 even 2
Otherwise, make the request b.
b. Execute: (1.5 point)
- If users choose "Odd" option, count the number of elements in the array that are odd integer number, then add the result to "List of Executions" as shown below.
- If users choose "Even" option, count the number of elements in the array that are even integer
number, then add the result to "List of Executions" as shown below.
When input array and choose an option
Enter an integer arrау: 1,2,3,4
Choose an option:Odd Even
Result:
COUNT
After clicking the "COUNT" button
Enter an integer array: 1,2,3,4
Choose an option:Odd Even
Result:
2
COUNT
List of Executions:
Array Option Result
1,2,3,4 odd 2
+ 100%
List of Executions:
=>
Array Option Result
1,2,3,4 odd
1,2,3,4 even 2
2
Close