hello
i have problem creating a Sequence application that generates a series of random numbers from 0 to 9 until a 0 is generated and then displays the length of the sequence of numbers.
the output should look similar to this
3 6 7 8 9 0
Length of the sequence was 6
please help complete the program because i dont know what to do or where to begin.
this is what i have so far
import java.util.Scanner
import java.util.Random
public class Sequence
{
public static void main(String[] args)
{
Scanner input = new Scanner (System.in);
Random r = new Random();
int randomNum = r.nextInt(9 - 0 +1)+0;
}
}