1
Hi Seshadri,
You can iterate throught list using for loop and divided each number with 2 to find odd or even.
-
for(int i =0;i<customer.size();i++)
- {
- if (i % 2 != 0)
- {
- System.out.println(i);
- }
- }
Hope this helps
0
First ArrayList is type Independent
ArrayList alip= new ArrayList{123, 12, 093, 45};
foreach (var item in alip)
{
int iRet = (int)item/ 2;
if (iRet + iRet != (int)item)
{
//List the output
}
}
0
Hi,
Similar thread :
https://googleweblight.com/i?u=https://stackoverflow.com/questions/13079368/how-to-output-a-list-of-numbers-in-odd-and-even-c-sharp&hl=en-IN