Results 1 to 10 of 10

Thread: about arrays

  1. #1
    caner_sahan is offline Member
    Join Date
    Oct 2014
    Posts
    4
    Rep Power
    0

  2. #2
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,991
    Rep Power
    8

    Default Re: about arrays

    "Sum up component of an array"? You don't make any sense.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  3. #3
    Ronin is offline Senior Member
    Join Date
    Oct 2010
    Posts
    393
    Rep Power
    9

    Default Re: about arrays

    Not even as much as a hello or hi?

    Regards.

  4. #4
    Ronin is offline Senior Member
    Join Date
    Oct 2010
    Posts
    393
    Rep Power
    9

    Default Re: about arrays

    I should also add this is not the correct location for this post. Can a Mod kindly relocate accordingly.

    Thanks.

  5. #5
    caner_sahan is offline Member
    Join Date
    Oct 2014
    Posts
    4
    Rep Power
    0

    Default Re: about arrays

    I m sory about Im so new here and ı need to solve this problem immediately

  6. #6
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,991
    Rep Power
    8

    Default Re: about arrays

    If you want quick help, you need a better question. I told you what you have asked doesn't make sense. Nobody can answer that.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  7. #7
    Ronin is offline Senior Member
    Join Date
    Oct 2010
    Posts
    393
    Rep Power
    9

    Default Re: about arrays

    If you could provide the code you are currently having issues with and exactly what you want to achieve that would be a great help. And please wrap you code in the [code][/code] tags.

    The answer depends on several factors such as what array type you are using, the data you are trying to sum (Are these primitives or objects?), and whether or not you want to use something like a basic for loop or something like an Iterator.

    Regards.

  8. #8
    caner_sahan is offline Member
    Join Date
    Oct 2014
    Posts
    4
    Rep Power
    0

    Default Re: about arrays

    okay I m plannig a program which user can input some double value in an array.I know basic loops such as (while,for ,do while).I m searching for an algorithm to sum all of these values. thank you for feed backs

  9. #9
    Ronin is offline Senior Member
    Join Date
    Oct 2010
    Posts
    393
    Rep Power
    9

    Default Re: about arrays

    All you will need is a single variable to hold the running total. Iterate through your array adding each value to this running total.

    Regards.

  10. #10
    caner_sahan is offline Member
    Join Date
    Oct 2014
    Posts
    4
    Rep Power
    0

Similar Threads

  1. Replies: 4
    Last Post: 06-28-2014, 05:00 PM
  2. Copying Single Arrays to 2-D Arrays
    By jmscarlet9 in forum New To Java
    Replies: 7
    Last Post: 04-02-2012, 11:17 PM
  3. Casting Enum Type arrays to object type arrays
    By nmvictor in forum Advanced Java
    Replies: 4
    Last Post: 02-17-2012, 12:49 PM
  4. arrays and multidimensional arrays
    By belfast09 in forum New To Java
    Replies: 5
    Last Post: 06-14-2011, 01:28 PM
  5. Arrays.sort... why sorting all arrays in class?
    By innspiron in forum New To Java
    Replies: 6
    Last Post: 03-23-2010, 01:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •