**fun **main() {
*println*(**"Enter a Number"**)//1
**var **sum=0//2
**var **number = *readLine*()!!.*toInt*()//3
**val **temp=number//4
**while **(number!=0)//5
{
**val **digit = number%10//6
sum=sum+(digit*digit*digit)//7
number = number/10//8
}
**if**(temp==sum)//9
{
*println*(**"Entered Number $**temp** is ArmStrong"**)//10
}
**else
**{
*println*(**"Enter Number is $**temp** is not Arm Strong"**)//11
}
}

- Instruct the user to Enter an Integer Number
- Declare and initialize sum variable with 0 value
- Take the user input and after converting into value assigned to number variable
- Assign number value to a temp variable
- Execute the while statement until the number is not
- Initialized the digit variable after calculating
- Calculate the value of sum (Calculate the cube of digit and add to sum)
- Assign the number of after calculation
- Check If the condition for the number is Armstrong or not
- Print Number is Arm strong
- Print Number is not Arm strong