Multiply all the numbers in a list

How can we multiply the numbers in a list?

example - {1,2,3,5,6,7,9,10}

can you check:
grafik

1 Like

thank you @ppr , I was using the same thing but was missing that one parameter.

is there any other way we can achieve it, using for each? I am trying that also but result is failure.

You can do .
Assign Result=1
Use for Each for list
Assign
Result=Result*Cint(Item)

At the end you will get Result.

1 Like

@indrajit.shah
close to what Prathamesh has mentioned

we can do it within a for each. Just set the typeargument to Int32 (assumed an int array/list is looped). Then we can also omit the CInt
Result=Result * item

1 Like

@ppr & @ImPratham45 both of your suggestions are working thank you very much, using for each I wasn’t initializing the 1, that’s why getting the error.

Both the suggestion and reply’s are my solutions.

Perfect, but lets get closed the topic by using the solution flag. Just flag the post of Prathamesh. Other researchers can benefit from it and will see that both options are working. Thanks

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.