Hey I want to create a max function that does the same thing as the c++ max function counterpart does, but the only way I can see to do it is to compare each number with everyother number. Of course if its only two numbers then you can just compare them using blt
or bgt
then jumping to one target if number A is larger and printing it out, or jumping to another target is B is larger and printing that out, but how would you do it for a list of numbers I can't think think of a more efficient way then having to compare every number in the list to eachother to determine the largest one.
DarkDot 0 Newbie Poster
Duoas 1,025 Postaholic Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.