I had this Java exam last week and I didnīt know the answer to this question and it has bothered me since. So if someone could tell me what was the right answer so I can have peaceful mind.
So the question was:
Transform the following code into an equivalent do and do-while-loop. (sorry about my English)
PS. I pass the test but this is driving me crazy.Code:int f=0; for(int i=N-1; i >=0; i--) if( a[i] > a[f]) f = i;


Reply With Quote


Bookmarks