2. Write a program to print the numbers and use the continue statement when n=10. (Note n should be more than 10)
import java.util.Random;
public class ContinueWhen10
{
public static void main(String[] args)
{
Random generator = new Random();
int n = generator.nextInt(20) + 11;
System.out.println("The total amount of numbers (n) = " + n);
for (int i = 0; i < n; i++)
{
if (i == 10)
continue;
System.out.print(i + " ");
}
}
}