Hi All,
I have numbers between 1-100 and I want to display the 5 multiples and 5 included numbers.
Sample output: 5,10,15,20,25,30.................. 50,51,52,53,54,55,56,57,58,59,60,65,70...............95,100.
Discussion posts and replies are publicly visible
a!localVariables( local!sample:a!forEach( items: enumerate(100)+1, expression: {if(find(5,fv!index,1),fv!index,{}), if(mod(fv!index,5),{},fv!index) } ), local!data:union(local!sample,local!sample), local!data)
a!localVariables( local!data:enumerate(100)+1, local!5divisons:{if(mod(local!data,5),{},local!data),if(find(5,local!data),local!data,{})}, local!un:union(local!5divisons,local!5divisons), remove(local!un,1), ),
Once try this code
I didn't get the exact output But helpful
a!localVariables( local!data:a!forEach( items: enumerate(100)+1, expression: {if(mod(fv!index,5),{},fv!item),if(find(5,fv!item),fv!item,{})} ), union(local!data,local!data) )
once try this
a!forEach( items: enumerate(100), expression: { if( mod(fv!item,5), {}, fv!item ) })
(enumerate(20) + 1)*5
Very interesting to see different ways to do it. However I liked this one most.
a!forEach( items: enumerate(100)+1, expression: if(or( mod(fv!item,5)=0, find(5,fv!item)<>0 ), fv!item, {} ) )
a!localVariables( local!data: a!forEach( items: enumerate(100)+1, expression: append(if(find(5,fv!item),fv!item,{}),if(mod(fv!item,5),{},fv!item)), ), local!uniqueData:union(local!data,local!data), local!uniqueData )