I am doing an Ada program with lots of different functions messing with arrays, i got all my sorting functions going, i am now stuck on retrieving the maximum value in an array using a loop invariant to design the loop for that function. any help?
Share
How about simply looping over the whole array?
something like this:
will raise an exception if the array is empty, but this is left as an excercise for the reader, if those cases are needed.