For this Question: Take input from standard input while you do not get 0 as an input. Print all the inputs separated by space. It is guaranteed that the number of integers are less than 100000.The input will contain a series of integers in one line each. Input should be taken while you have not get a 0 as an input.

0 <= input <= 10Print the input integers seperated by space.Sample Input
6
5
5
0

Sample Output
6 5 5 0

Sample Input
9
3
5
7
6
9
8
3
2
7
7
3
5
0 

Sample Output
9 3 5 7 6 9 8 3 2 7 7 3 5 0, I have written this Solution Code: 
import java.util.*;
import java.lang.*;
import java.io.*;

class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
	    
		int n=100001;
		int a;
		for(int i=0;i<n;i++){
		    
		    a=sc.nextInt();
		    System.out.print(a+" ");
		    if(a==0){break;}
		    
		}

}	    


}, In this Programming Language: Java, Now tell me if this Code is compilable or not?