Following is the list and use of each variable that we're using in this program -

n - is the number that we're checking.

t - is the temporary variable whose value is equal to n i.e. t = n.

r - is used to store the remainder (we'll see that in a minute).

s - is the sum of cubes of all digits of n.

We first ask the user to enter a number n and then we also store this value of n in temporary variable t. Then using the While loop we calculate sum of cubes of all digits of n. Outside the loop we check if the sum of cubes of all digits of n is equal to the number itself then we print that the number is Armstrong number otherwise the number is not an Armstrong number.

Suppose n = 153. So t is also 153. Let's see how while loop works in this example -