Thread: Need help making a program keep going.

  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    38

    Question Need help making a program keep going.

    I'm just getting started in programming, and i'm trying to make a program that would have a " conversation" with the user. The idea is that it uses a set of if-then statements to respond to a person's input, but every time, after the first comment, the program ends. What I need to know is how to make the program respond to the person's response.



    ex:
    Command Promp: Hi, I'm the computer. What's your name?
    Person: Ted or BIll

    (if ted, the computer says "Hey, I had a broter named ted.
    If Bill, the computer says "Bill, like the old president?")

    The problem is, that here, I don't know how to let the person respond to the computer's statement.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    So what have you done so far?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    Show us what you have so far. Lots of folks on this forum want to know how to do this too.
    Mainframe assembler programmer by trade. C coder when I can.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Making a program run on startup
    By Poincare in forum C Programming
    Replies: 10
    Last Post: 06-21-2009, 12:50 PM
  2. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. Making interest rate program in C
    By canadas321 in forum C Programming
    Replies: 6
    Last Post: 06-23-2005, 11:59 AM
  5. I need help with making a program which....
    By Tonyukuk in forum C# Programming
    Replies: 1
    Last Post: 04-16-2003, 10:49 PM

Tags for this Thread