LargeValue := Max(FirstValue, SecondValue); LargeValue := Max(LargeValue, ThirdValue); SmallValue := Min(FirstValue, SecondValue); SmallValue := Min(SmallValue, ThirdValue); for i := 0 to 2 do if (a[i] <> SmallValue) and (a[i] <> LargeValue) then IntermediateValue := a[i];
The largest number can be found by starting with the larger digit, followed by the second larger one (intermediate), and terminating with the smallest one.
No need to sort.
Hahaha What do you call "first determining the largest number, then the second largest number etc. etc..." ???I call that sorting
Still, no-one has seen any code from topic-starter, so it may very well be that him saying he finished the program is merely a tactic to see our solutions