Thread: Basic Loop

  1. #16
    Registered User
    Join Date
    Jan 2011
    BTW: Thanks to everyone who continued to monkey with this and try for fixes. Thanks a ton!


    Happy coding!

  2. #17
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Heh, sounds like some kind of IDE or compiler problem where the build was not happening correctly, then by inducing a compile error, you somehow managed to fix the build. Weird, but whatever works, I guess.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #18
    casual coder spaghetticode's Avatar
    Join Date
    Jan 2011
    Hesse, Germany
    Sample execution here:

    [dennis@marx ~]$ gcc -o test test.c
    [dennis@marx ~]$ ./test
    Enter a number: 45
    Enter a number: 72
    Enter a number: 1
    The number is 1
    AWESOME[dennis@marx ~]$

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 23
    Last Post: 04-05-2011, 03:40 PM
  2. using for loop and functions to create a basic menu
    By sunandstars in forum C Programming
    Replies: 2
    Last Post: 02-19-2011, 02:12 PM
  3. The Infinit loop that doesn't loop.
    By errigour in forum C Programming
    Replies: 1
    Last Post: 11-09-2010, 11:31 AM
  4. Basic Loop Question
    By demiurge in forum C++ Programming
    Replies: 1
    Last Post: 12-02-2009, 09:10 AM
  5. for loop ignoring scanf inside loop
    By xIcyx in forum C Programming
    Replies: 2
    Last Post: 04-17-2007, 01:46 AM