How do I find the range of a bunch of #'s using for loops?

I have a program that gets 13 numbers from the user and I nned to find the range of them. How do I do this with for loops?

This is what I have so far
if (one > two && one > three && one > four && one > five && one > six && one > seven && one > eight && one > nine && one > ten && one > eleven && one > twelve && one > thirteen)
               big = one;
          else if (two > one && two > three && two > four && two > five && two > six && two > seven && two > eight && two > nine && two > ten && two > eleven && two > twelve && two > thirteen)
               big = two;
          else if (three > two && three > one && three > four && three > five && three > six && three > seven && three > eight && three > nine && three > ten && three > eleven && three > twelve && three > thirteen)
               big = three;
          else if (four > two && four > three && four > one && four > five && four > six && four > seven && four > eight && four > nine && four > ten && four > eleven && four > twelve && four > thirteen)
               big = four;
          else if (five > two && five > three && five > four && five > one && five > six && five > seven && five > eight && five > nine && five > ten && five > eleven && five > twelve && five > thirteen)
               big = five;
          else if (six > two && six > three && six > four && six > five && six > one && six > seven && six > eight && six > nine && six > ten && six > eleven && six > twelve && six > thirteen)
               big = six;
          else if (seven > two && seven > three && seven > four && seven > five && seven > six && seven > one && seven > eight && seven > nine && seven > ten && seven > eleven && seven > twelve && seven > thirteen)
               big = seven;
          else if (eight > two && eight > three && eight > four && eight > five && eight > six && eight > seven && eight > one && eight > nine && eight > ten && eight > eleven && eight > twelve && eight > thirteen)
               big = eight;
          else if (nine > two && nine > three && nine > four && nine > five && nine > six && nine > seven && nine > eight && nine > one && nine > ten && nine > eleven && nine > twelve && nine > thirteen)
               big = nine;
          else if (ten > two && ten > three && ten > four && ten > five && ten > six && ten > seven && ten > eight && ten > nine && ten > one && ten > eleven && ten > twelve && ten > thirteen)
               big = ten;
          else if (eleven > two && eleven > three && eleven > four && eleven > five && eleven > six && eleven > seven && eleven > eight && eleven > nine && eleven > ten && eleven > one && eleven > twelve && eleven > thirteen)
               big = eleven;
          else if (twelve > two && twelve > three && twelve > four && twelve > five && twelve > six && twelve > seven && twelve > eight && twelve > nine && twelve > ten && twelve > eleven && twelve > one && twelve > thirteen)
               big = twelve;
          else if (thirteen > two && thirteen > three && thirteen > four && thirteen > five && thirteen > six && thirteen > seven && thirteen > eight && thirteen > nine && thirteen > ten && thirteen > eleven && thirteen > twelve && thirteen > one)
               big = thirteen;
          if (one < two && one < three && one < four && one < five && one < six && one < seven && one < eight && one < nine && one < ten && one < eleven && one < twelve && one < thirteen)
               little = one;
          else if (two < one && two < three && two < four && two < five && two < six && two < seven && two < eight && two < nine && two < ten && two < eleven && two < twelve && two < thirteen)
               little = two;
          else if (three < two && three < one && three < four && three < five && three < six && three < seven && three < eight && three < nine && three < ten && three < eleven && three < twelve && three < thirteen)
               little = three;
          else if (four < two && four < three && four < one && four < five && four < six && four < seven && four < eight && four < nine && four < ten && four < eleven && four < twelve && four < thirteen)
               little = four;
          else if (five < two && five < three && five < four && five < one && five < six && five < seven && five < eight && five < nine && five < ten && five < eleven && five < twelve && five < thirteen)
               little = five;
          else if (six < two && six < three && six < four && six < five && six < one && six < seven && six < eight && six < nine && six < ten && six < eleven && six < twelve && six < thirteen)
               little = six;
          else if (seven < two && seven < three && seven < four && seven < five && seven < six && seven < one && seven < eight && seven < nine && seven < ten && seven < eleven && seven < twelve && seven < thirteen)
               little = seven;
          else if (eight < two && eight < three && eight < four && eight < five && eight < six && eight < seven && eight < one && eight < nine && eight < ten && eight < eleven && eight < twelve && eight < thirteen)
               little = eight;
          else if (nine < two && nine < three && nine < four && nine < five && nine < six && nine < seven && nine < eight && nine < one && nine < ten && nine < eleven && nine < twelve && nine < thirteen)
               little = nine;
          else if (ten < two && ten < three && ten < four && ten < five && ten < six && ten < seven && ten < eight && ten < nine && ten < one && ten < eleven && ten < twelve && ten < thirteen)
               little = ten;
          else if (eleven < two && eleven < three && eleven < four && eleven < five && eleven < six && eleven < seven && eleven < eight && eleven < nine && eleven < ten && eleven < one && eleven < twelve && eleven < thirteen)
               little = eleven;
          else if (twelve < two && twelve < three && twelve < four && twelve < five && twelve < six && twelve < seven && twelve < eight && twelve < nine && twelve < ten && twelve < eleven && twelve < one && twelve < thirteen)
               little = twelve;
          else if (thirteen < two && thirteen < three && thirteen < four && thirteen < five && thirteen < six && thirteen < seven && thirteen < eight && thirteen < nine && thirteen < ten && thirteen < eleven && thirteen < twelve && thirteen < one)
               little = thirteen;
I'm trying to fix this so it's not so confusing with for loops

Similar Messages

  • How do you find the range of a counter and what do you mean by time limit

    hi
    can any one please tell me how to find the range of a counter for an 6025e DAQ board
    thanks

    Use Adjacent counters.vi to read the counter size (24 bits for the PCI-6025E --> range = 0 to 2^24 -1).
    You can access it in :
    1)..\vi.lib\daq\ctr.llb\
    2) Function palette --> DAQ --> Counter --> Am9513 & 8253 Compatibility
    Please clarify your question about the time limit.

  • How do I find the path to a TestStand sequence file using LabVIEW

    My LabVIEW application launches a bunch of teststand sequences, provided it has the complete path to each of them. I want to make it more flexible by providing it just the name of the TestStand sequence so that it will go and find the path to the sequence by searching a directory structure. TestStand has a neat FindFile() function that can do this, but I need to do this from within LabVIEW. Is there a way to do it?

    There are a few ways to do this depending on how you are getting the sequence files.  If you are calling the GetSequenceFileEx method, you can just pass the GetSeqFile_FindFile (0x20) flag in the SequenceFileFlags property.  If you are using the ApplicationMgr.OpenSequenceFile method, this is automatically done for you.
    If you want to use the FindFile function in general, you can use the Engine.FindFile method.
    Allen P.
    NI

  • How do I find the file size of my presentation in keynote for iPad?

    I know this is a simple question, and I have a work around by just emailing the file to me, but I want to know how I can see the file size as I work on the file within keynote.....on the iPad.
    Thanks

    Select the album, Select all photos in the album, then click on the info button.   Number of photos and total size are on  top of info pane.

  • How can I find the Reseller Console ID or APC Membership ID for my current VIP reseller?

    The subject summarizes this. I just want to find out the Reseller Console ID or APC Membership ID for PC Mall Sales Inc, my reseller.

    Send an email to: [email protected]

  • I cannot get MainStage 3 to find the Aggregate Device I am trying to use for input.  I have two USB interfaces and need to use both for input.

    The MainStage 3 Audio preferences window will not find the Aggregate Device input.  I have both an Apogee Jam and a MOTU Mike Ultralight in USB ports.  The Audio aggregator finds them and treats them as one device.  The Aggregate Device does not show up in either Logic or MainStage.  However, unlike Logic, MainStage does not show "System Settings" an input device.

    The iphone 3G can only support 4.2.1
    There are no newer updates availabel for this model.

  • How do I find the 'name' of a photo I've used in iWeb project?

    I've built an iWeb project.  I've used a certain photo as a background.  I've got three versions of that photo, almost identical, in my 'photos' folder.  I want to find out which was the exact one used.  Is there a way IN iWeb, while working on a project, to get the names of the various elements being used, specifically the photos?
    All ears,
    Ben

    In iMovie 9, look in your iMovie Events and iMovie Projects folders.
    In iMovie 10, look in your .imovielibrary package (right click & select "Show package contents")
    The default location of these is in your Users / ,user name> / Movies folder.
    Geoff.

  • How do I find the directory where my bookmarks are kept using windows explorer?

    Neither firefox nor internet explorer work anymore on my administrator account, but internet explorer works on my guest account. Perhaps a virus caused this. But windows explorer works fine. Computer is so fouled up I want to just buy a new one, better and cheaper than fixing the old one.
    I need to locate my firefox bookmarks and need to know how to transfer them into the new computer.

    See:
    *http://kb.mozillazine.org/Backing_up_and_restoring_bookmarks_-_Firefox
    *https://support.mozilla.com/kb/Profiles
    *Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    Do a malware check with some malware scanning programs.<br />
    You need to scan with all programs because each program detects different malware.<br />
    Make sure that you update each program to get the latest version of their databases before doing a scan.<br /><br />
    *http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    *http://www.superantispyware.com/ - SuperAntispyware
    *http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    *http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    *http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    See also:
    *"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked

  • How do i find the password to unlock my iphone backup file for a new iphone?

    I am trying to restore the back up files and music from my old iphone 3gs but when I plug in the new iphone 4 i got, It said i need a password to transfer the backup from the old phone to the new phone but I have no idea what that password would be... any ideas?

    you are incorrect level 5, see this discussion https://discussions.apple.com/message/16368498#16368498

  • How can I reset the CAN card before it can be used for transmit from VC++

    I am using a tool developed in VC++ to send and receive the CAN data ove NI-CAN card. The application is designed in with different threads, which will call the NI-Card for sending and receiving messages.One thread will use the card for sending, others will be waiting for the completion. Once one thread completes next which is there in the queue will take control over CAN card and will release after using it. So other threads can use it. Every thread will follow initialize -> send -> uninitialize sequence. I am facing a problem If more threads are used, the can card is giving the NI can card initialization failed. Only way to use the CAN card after it is failed is to restart the complete operating system
    Is there any function to reset the CAN card driver from VC++ (it is using NI drivers) before it is initialized to avoid restarting the system?
    Please help. 
    Message Edited by Md_Sajid on 09-17-2009 01:44 AM

    Since sound can only come from the speakers, you will need to clarify what you have tried so far. Is your volume level turned up? Is the volume low when you are trying to play music? Is there a case on your phone obstructing the speakers? Is there any dust or lint in the speakers? Try a reset, hold the power button and home button until you see the apple then let go.

  • How to find the Ranges for a field ?

    Hello All,
               Can anyone tell me how to find the ranges for a field.
    <b>1</b>, i.e say I want the Ranges Structure for the field LIFNR.
        The ranges structure for this is "<b>RANGE_LIFNR</b>".
        This I used in my Program since I know it previously.
        But now I want the ranges structure for the field <b>VBELN (Delivery Document).</b>
        I  don't know what is it !!!!!
    <b>2</b>, Is there any procedure to know the ranges structure for a particular field ?
    Regards,
    Deepu.K

    Hi Deepu,
    Using 'Where used list' you can able to find out RANGES tables.
    For VEBLN range table is --> CRM_AC_ASSIGN_VBELN
    If you using a program defined as shown below.
    DATA: r_vbeln type ranges of vbeln.
    The above statement also creates ranges structure in Runtime.
    Procedure finding range table structures
    go to SE37 -> Enter domain or dataelement value
    Go to where used list --> search for 'Structures'
    After getting all structure  --> Click 'SEARCH' butoon in tool bar --> Search for 'RANGES' word
    You can get all ranges tables in the search window
    If helps plz reward points.
    Regards
    Bhupal Reddy

  • I have bought a film from itunes and the credit has come out of my account, but i can't find the film anywhere, it said it was downloading, then i left the laptop and on return i couldn't find the film. how do i find the film?

    i have bought a film from itunes and the credit has come out of my account, but i can't find the film anywhere, it said it was downloading, then i left the laptop and on return i couldn't find the film. how do i find the film?

    Maybe it is in the Purchased category of iTunes,
    Try going there

  • How do I find the cookies I want to keep

    Recently I asked for some help but I think my request has got lost.
    I had beenadvised to save the cookies I want to keep but this is beyond me.
    My question is how do I find the cookie I want to keep? It is a cookie for an ebook and I have no idea what it is.
    Will deleting all other cookies mean that it will also delete my passwords and log ins on several sites? I don't want this to happen.
    Which brings me to the last point - You say that if I list exceptions to cookies I want to keep (at least I think that is what you mean), how do I find all those cookies?
    Again, sorry for troubling you but until I can find out more about the cookies, I don't want to delete these in case I delete the wrong ones, such as the ebook.
    Thank you cor-el. I do appreciate your advice...enormously.
    Anthony

    Dear Sir,
    Thank you so much for the above. It will be of great help in telling me where to go. But my problem is that if I can find cookies, I don't know which ones I want to keep. Are they labelled with the sites they refer to? If so that will help me. Apart from one which is the cookie I need to get to my online ebook, I guess there are cookies for the various passwords I have saved?
    Forgive me but I am an old man and not real great with computers.
    Thanks,
    Anthony

  • In Mountain Lion, how do I find the location of an open Preview File?  The file "properties" tab is no longer available.

    I typically have several open Preview files at any one time and often forget where, sometimes if, I saved them.  In Mountain Lion, how do I find the location of an open Preview File?  Tried holding option + command in spotlight but I don't see a path name appear anywhere. 

    Yes, cmd-option on a file you choose in Spotlight and the path will appear at the bottom of the Preview window.
    EDIT: Also, if it is bookmarked the path is in Bookmarks.

  • How can we find the most usage and lowest usage of table in Sql Server by T-SQL

    how can we find the most usage and lowest usage of table in Sql Server by T-SQL
    The table has time stamp column
    StartedOn datetime
    EndedOn datetime

    The Below query has been used , but the textdata column doesnot include the name of the table ServiceLog.
    SELECT
    FROM
    databasename,
    duration
    fn_trace_gettable('F:\Program
    Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log\log_148.trc',
    default)
    WHERE
    DATABASENAME='ZTCFUTURE'
    AND TEXTDATA
    IS
    NOT
    NULL
    --AND TEXTDATA LIKE 'SERVICE%'
    order
    by cpu
    desc; 

Maybe you are looking for

  • Hiding plots in legend

    Hello, I am currently producing a XY graph based on a set of points.  Along with this, I plot three trendlines that the user then will select from.  When he/she selects one of the trendlines, I wish for the other two to disappear.  Currently, I am ab

  • Acrobat Pro 9, measurement and units are wrong?

    when I measure perimeter or area, and input the correct ratio from the blueprints of say .25" = 1 foot, the corresponding output from the tool is wrong...how to adjust the ratio so it's correct? I have toggled the "use units from document" on/off, tr

  • Oracle 10g over Windows 7 - ORA-12514 TNS:listener does not currently know

    Dear, I installed Oracle 10.1.0g over windows 7, now during installation its show me ORA-12560 TNS protocol adapter error, I ignored it for many dialog. then devery thing goings well. Once I try do login via sql plus, new message appear "ORA-12514: T

  • Insert itab1 into itab2 as a coloumn

    Hi all, can any one tell me how should i insert the contents of one internal table suppose IT1 as a single coloumn   in another  internal table IT2.. My IT1 has 4 fields. data of these fields should come one below the other as a single coloumn. I sho

  • I get a error when starting Apache Tomcat 6.0 service

    Hi Friends, I get a error when starting Apache Tomcat 6.0 service. Do you help me? Kind regards. Fatih Temiz First Step: Second Step: Thanks for helps...