Advertisement
a3f

max of a collection

a3f
May 7th, 2012
1,192
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for i = 1 to 20
  2.     read num
  3.    
  4.     if i = 1 then Xmax = num
  5.     if num >= Xmax then
  6.         current = i
  7.         Xmax = num
  8.     end if
  9. next i
  10. print Xmax, current
  11. Data 12,-15,18 ' etc .....
Advertisement
RAW Paste Data Copied
Advertisement