BASIC 1ST YEAR C PROGRAMING using arrays

This is a discussion on BASIC 1ST YEAR C PROGRAMING using arrays within the C Programming forums, part of the General Programming Boards category; nvm i got it thnks anyway...

  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 11:50 AM.

  2. #2
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,164
    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, 07: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, 01:57 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