Please help with my coding!

This is a discussion on Please help with my coding! within the C Programming forums, part of the General Programming Boards category; Hi,I was trying to print numbers from an array(as stated in the comment) but the result always turns out different. ...

  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    2

    Please help with my coding!

    Hi,I was trying to print numbers from an array(as stated in the comment) but the result always turns out different. Can anyone please review the attached picture and correct me? Thanks in advance.
    Attached Images Attached Images  

  2. #2
    Registered User
    Join Date
    Nov 2011
    Posts
    63
    Look at your print statement and think about what it is printing.

  3. #3
    Registered User
    Join Date
    Nov 2011
    Location
    Saratoga, California, USA
    Posts
    334
    Ask yourself, what the heck is num?

  4. #4
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    You aren't even using your array.
    The num variable is being used in an uninitialized state.
    Your loop merely prints 300 copies of the same number
    There's nothing in there to decide if a number is less than 300 or not.

    Back to the ole drawing board, methinks....

  5. #5
    Registered User
    Join Date
    Nov 2011
    Posts
    2
    Got it guys..thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. need example coding
    By britto116 in forum C Programming
    Replies: 3
    Last Post: 11-18-2009, 07:22 PM
  2. HELP with coding.....
    By shaheel in forum C Programming
    Replies: 30
    Last Post: 11-08-2007, 10:41 AM
  3. Better Coding Way?
    By radiohead in forum C Programming
    Replies: 2
    Last Post: 01-19-2006, 03:51 PM
  4. help with coding...
    By ahming in forum C Programming
    Replies: 6
    Last Post: 04-26-2004, 08:08 AM
  5. Before Coding
    By cyberCLoWn in forum C++ Programming
    Replies: 16
    Last Post: 12-15-2003, 01:26 AM

Tags for this Thread


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