Here is a flowchart. Look at the loop. Can you see how it is being controlled? What kind of loop is this?
Code it in Java.
Here is a flowchart. Can you see how the loop is being controlled? What kind of loop does it represent?
Code it in Java.
Here is a program written in PSEUDOCODE. Can you represent it using a flowchart?
array = [1,4,2,3,5,7,6,0,8,9]
index = -1
input searchItem
loop for i from 0 to 9
if array[i] = searchItem then
index = i
end if
end loop
if index = -1 then
output "item not found"
else
output "item found at index ", index
end if