1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Combined loops

Discussion in 'C' started by NewBee, Jan 23, 2007.

  1. NewBee

    NewBee New Member

    Joined:
    Jan 23, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    I am having trouble understanding the following question in which a programming situations would require a combined counting and logic looping construct. I understand the various types of loops and how they ae used. And that you can use other types of loops counting type of loop. And some loops actually make the code alot longer than needed.but in what situation would you combine the two. Thanks ahead of time
     
  2. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    I might want to repeat some operation until I reach some logical result (success), or have failed to do so after 10 (or 10 million) tries. That logical and countable enough for you?

    Aside: posting more than once doesn't increase the favorable attention you receive; it dilutes it. If you join a new church, you will probably size up the membership and culture before you fart out loud. The same is true of forums. Read the rules. Read the "How to post" or "Before you make a query" threads. It's merely a sensible and polite thing to do, wouldn't you say?
     

Share This Page