for loops in C

This is a discussion on for loops in C within the C Programming forums, part of the General Programming Boards category; I need help stoping my for loops after they reach a certain point because they print all the possible answers ...

  1. #1
    Unregistered
    Guest

    for loops in C

    I need help stoping my for loops after they reach a certain point because they print all the possible answers and not just the first one.
    the structure is four consecutive for loops all running separate counters until they satisfy an if statement at the end of the last for loop. Since there are many solutions, it prints all of them but I only want the first one to print. I tried a break statement but it did not help.
    Sam

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    28
    Post some code so we can see what your doing.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21