My prediction of the flow is that, if the function is called inside the for loop - haha(k+1) -, that function gets executed first before do4 and do5 right?
I am still confused how this code proceed from the beginning..
Sorry I missed the for loop (indentation would make your program easier to read). But the same holds true within the loop each line runs from the start of the loop to the bottom of the loop. Then once the loop ends it will proceed with the statement following the loop's terminating brace.