//I need to ask the user for the size of the list they want, then generate random numbers with an array list for the size list they want, and output the list. These steps I have done but then I have to output the number of odd numbers in the list using an enhanced for loop and then reprint the list without even numbers.//
import java.util.Scanner;
import java.util.ArrayList;
public class MyProgram
{
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
System.out.println("How big would you like your list?");
int decision = scan.nextInt();
ArrayList<Integer> Rando = new ArrayList<Integer>();
for (int i = 1; i <= decision; i++)
{
Rando.add((int)(Math.random()*100 + 1));
}
System.out.println();
System.out.println(Rando);
ArrayList<Integer> evens = Rando;
for (int i = 0; i < evens.size(); i++)
{
if (evens.get(i)%2 != 0)
{
evens.remove(i);
}
}
ArrayList<Integer> odds = Rando;
for (int i = 0; i < odds.size(); i++)
{
if (odds.get(i)%2 != 0)
{
evens.remove(i);
}
}
System.out.println();
System.out.println(odds);
for(Integer number: Rando)
{
System.out.println();
System.out.println("# of Odd Numbers: "+ odds.size());
System.out.println();
break;
}
System.out.println("List Without Evens: " + evens.remove);
System.out.println();
}
}