In a simple IF statement loop

by (Login burger2227)
R


FOR i = 1 TO 10

IF array%(i) > highest% THEN highest% = array%(i)

NEXT

When the loop is done, you should have the highest integer in the array.

Posted on Dec 20, 2009, 9:55 AM

Respond to this message   

Return to Index


Response TitleAuthor and Date
I dont know what you meen...unseenmachine on Dec 20
 Don't use 50 CNT variables. Use one Array! on Dec 20
 You need to learn about arrays first...Pete on Dec 20
  getting there...but...unseenmachine on Dec 20
 Array sample showing high and low valuesSolitaire on Dec 20
  Here's how it would work with your program:Solitaire on Dec 20
   Thanks, but....unseenmachine on Dec 20
    Sure. Here is the Bubble Sort algorithm:Solitaire on Dec 20
     * Ever hear of SWAP? You is doin it in VB :-P on Dec 20
      You're right, Clippy.Solitaire on Dec 20
       * I found that out in VB6. I swapped like you did. on Dec 20
       But you use bubble sortqbguy on Dec 21
        The one I posted was even easier...Pete on Dec 21
         * But that one's just a less optimized bubble sortqbguy on Dec 21
          So?Pete on Dec 21
        * Because it is NOT "intuative" to a new programmer. on Dec 21
         Am i the programmer in question? on Dec 21
          Not really. There are dozens of ways to SORT. Some are not easy to understand. on Dec 21
          I've been coding more years than you've been alive.Pete on Dec 21
         How is bubble sort more intuitive than selection sort?qbguy on Dec 21
          * I use shell sort without a problem. Not everything involves vast arrays. on Dec 21
    Why would you want to change the array data? on Dec 20
     The purpose of it all...well some of it anywayunseenmachine on Dec 20
      The ten most likely would probably be the least used balls, but on Dec 20
      Fun to program but fruitless to use.Pete on Dec 21
       Fot those who are not englishunseenmachine on Dec 21
        * I thought for the lottery the order doesn't matter thoughqbguy on Dec 21
         * Up with disorderly balls the Engish will not put!Sir Winston on Dec 21
        * Just switch < to > 'get the lowest' to 'get the highest' and 1 to 10 for results.Pete on Dec 21
         Done, well to a fashionunseenmachine on Dec 21
          * Well I think that is more than 50 numbers. on Dec 21
           Re. more than 50 numbersunseenmachine on Dec 21
            Of course!Solitaire on Dec 22