Jump to content

free pascal array help

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
Farkeman

Farkeman

    Newbie

  • Members
  • Pip
  • 1 posts
i missed array class and im freakin lost on that , i watched some online tutorials but still i cant get how it works

anyway heres what i need to do
-There is n melons on the table , we know their weight . Make a progam that would find heavyest melon and would calculate its price if 1 kilogram coasts k euros.

any thoughts ?
its looks so easy but my head is just not getting this array thing today

#2
Sinipull

Sinipull

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 386 posts
iterate over the array using for-statement and always keep the highest weight in some variable and compare it during the iteration. in the end multiply the variable(heaviest melon) with the cost.