IF Statement

This is a discussion on IF Statement within the C Programming forums, part of the General Programming Boards category; Hi im really new to programming and need to write an IF statement inside my function. Basically it asks for ...

  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    2

    IF Statement

    Hi im really new to programming and need to write an IF statement inside my function.

    Basically it asks for the home phone number and mobile number. I need to write an IF so that if someone enters a home phone number it will not ask for the mobile and carry on asking the rest of the questions.

    Thanks for ya help!

  2. #2
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Code:
    /* type: 0 is home, 1 is mobile) */
    if ( type == 0 )
      /* get info */
    else
      /* get info */

  3. #3
    Registered User
    Join Date
    Apr 2004
    Posts
    2
    Thanks, much appreciated!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Usefulness of the "else if" statement
    By gn17 in forum C Programming
    Replies: 7
    Last Post: 08-12-2007, 05:19 AM
  2. Meaning of this statement?
    By @nthony in forum C Programming
    Replies: 7
    Last Post: 07-16-2006, 02:57 AM
  3. If Else statement problem
    By doofusboy in forum C Programming
    Replies: 2
    Last Post: 11-09-2005, 06:18 AM
  4. if/break statement
    By Apropos in forum C++ Programming
    Replies: 7
    Last Post: 02-22-2005, 01:33 PM
  5. Uh-oh! I am having a major switch problem!
    By goodn in forum C Programming
    Replies: 4
    Last Post: 11-01-2001, 03:49 PM

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