Can anyone help me out how to create a service, whose input should be two lists(of numbers) and output should be a list of numbers. The output should be list of odd numbers, from both the input lists
Hi Moudhgalya,
is there any information about the ordering of the numbers from the two lists (i.e. first the numbers of the first list, then the numbers of the second list, or should the resulting list be sorted by any specific criteria)?
Did you check the IS BuiltIn Services Reference for the pub.mathFolder and the pub.utilFolder for helpful services?
Here is some pseudo code as a starting point:
 Define empty result list
 LOOP over first input list
– Check if current number is odd (might result in an implementation of an helper service)
– Branch on if odd
— Odd: add to result list
— Even: do nothing  LOOP over second input list
– Check if current number is odd (might result in an implementation of an helper service)
– Branch on if odd
— Odd: add to result list
— Even: do nothing  add sorting/filtering here if neccessary
Regards,
Holger
Hi Holger ,
I just want to print the odd numbers from both list(input list1 and input list2) to result (output list)
Regards,
Moudhgalya Dhavan.
Hi Moudhgalya,
in the PSUtilities package (this package is available in the Samples section of the TechCommunity) there is a service named ps.util.math:modDivideInts, which can be used as the helper service I have mentioned in my pseudo code above.
Input numerator will be the value to be checked and denominator will be set to 2.
Then check for the output of remainder for 0 (=even) or 1 (=odd).
Regards,
Holger
Hi Moudhgalya,
Below is just an outline logic for implementing your requirement.

If input 1 and input 2 are not empty then make temp string list using pub.list.addStringList

Use LOOP to iterate through temp list

Do mod 2 like > number % 2

If result is 1 then odd number then make add to output list else ignore
This should work out.
Regards,
Jacob