For this Question: Given an integer N, your task is to print all the Armstrong numbers which are present between 1 to N.

<b>A number is said to Armstrong if it is equal to sum of cube of its digits. </b>The input contains a single integer N.

Constraints:-
1 < = N < = 1000Print all the number which are armstrong numbers less than equal to N.Sample Input:-
2

Sample Output:-
1

Sample input:-
4

Sample Output:
1, 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 = sc.nextInt();
		int digitsum,num,digit;
		for(int i=1;i<=n;i++){
		    digitsum=0;
		    num=i;
		    while(num>0){
		        digit=num%10;
		        digitsum+=digit*digit*digit;
                       num/=10;
		    }
		    if(digitsum==i){System.out.print(i+" ");}
		    
		}
		
	}
}
, In this Programming Language: Java, Now tell me if this Code is compilable or not?