Programming Issue

public static void main(String[] args) {

	 int num, number, temp, total = 0;
	 
        Scanner scanner = new Scanner(System.in);
        num = scanner.nextInt();
        number = num;

        for( ;number!=0;number /= 10)
        {
            temp = number % 10;
            total =(int) (total + Math.pow(temp, number));
        }

        if(total == num)
            System.out.println("true");
        else
            System.out.println("false");

This is the code for armstrong no. .Please help me in this

@amangaur078,
You need to count the number of digits in the number as well. Then raise every digit to the power of total digits in the number.

First start a loop to calculate number of digits in a number.

Then start a loop that one by one takes every digit and raises it to the power of total digits present in the number

See the example:
1634 is an Armstrong number as 1634 = 1^4 + 6^4 + 3^4 + 4^4
Here 4 is the total digits.