Thread: BASIC 1ST YEAR C PROGRAMING using arrays

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

    BASIC 1ST YEAR C PROGRAMING using arrays

    nvm i got it thnks anyway
    Last edited by programingnoob; 11-20-2011 at 12:50 PM.

  2. #2
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    Code:
    for (countern=negn;countern<=posn; ++negn){
        hello[i]=negn;
    The idea it to count from negn to posn, so what should be changing each iteration is countern, not negn:
    Code:
    for (countern=negn;countern<=posn; ++countern){
    Now since countern is your iterator, you want to use that for your array assignments:
    Code:
    hello[i]=countern;
    If you understand what you're doing, you're not learning anything.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with most basic arrays.
    By matthayzon89 in forum C Programming
    Replies: 2
    Last Post: 03-28-2010, 10:36 AM
  2. Quick Question, Basic Programing
    By brian75 in forum C++ Programming
    Replies: 2
    Last Post: 12-16-2008, 08:14 PM
  3. Program showing if a year its leap year or not.
    By Cyberman86 in forum C++ Programming
    Replies: 5
    Last Post: 09-12-2008, 08:00 AM
  4. I have few questions about basic C++ programing
    By wonderland in forum C++ Programming
    Replies: 2
    Last Post: 10-17-2007, 10:13 PM
  5. basic question to Arrays
    By doneirik in forum C++ Programming
    Replies: 1
    Last Post: 01-25-2005, 02:57 AM

Tags for this Thread