array element multiplication

This is a discussion on array element multiplication within the C# Programming forums, part of the General Programming Boards category; Hi, I am trying to mulitply elements in an array, I know how to sum them but I am having ...

  1. #1
    dpeso
    Guest

    Cool array element multiplication

    Hi,

    I am trying to mulitply elements in an array, I know how to sum them but I am having a memory block to multiply them.

    sum = sum + array[n]; **/sum

    multiply elements in array[n] ????

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,138
    Perhaps

    mul = mul * array[n];

    ???
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Absolute value of each element in a given array
    By DriftinSW20 in forum C Programming
    Replies: 9
    Last Post: 11-15-2007, 03:08 PM
  2. Modify an single passed array element
    By swgh in forum C Programming
    Replies: 3
    Last Post: 08-04-2007, 08:58 AM
  3. Replies: 19
    Last Post: 07-20-2007, 01:46 AM
  4. Deleting an element from an array
    By Matt13 in forum C Programming
    Replies: 7
    Last Post: 11-19-2003, 03:42 AM
  5. Struct *** initialization
    By Saravanan in forum C Programming
    Replies: 20
    Last Post: 10-09-2003, 12:04 PM

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