A “magic” number is an integer in which the number is equal to the sum of the cubes of its digits. Write a program to determine whether a three digit number entered by the user is a magic number.

To determine whether a three-digit number is a magic number, we need to write a program that performs the following steps:

1. Accept input from the user for a three-digit number.
2. Separate the number into its individual digits.
3. Calculate the sum of the cubes of the digits.
4. Compare the result with the original number.
5. If the result is equal to the original number, then it is a magic number. Otherwise, it is not.

Here's an example of how you can implement this program in Python:

```python
# Step 1: Accept input from the user
number = int(input("Enter a three-digit number: "))

# Step 2: Separate the number into individual digits
digit1 = number // 100 # Extract the hundreds digit
digit2 = (number // 10) % 10 # Extract the tens digit
digit3 = number % 10 # Extract the units digit

# Step 3: Calculate the sum of the cubes of the digits
digit_sum = digit1**3 + digit2**3 + digit3**3

# Step 4: Compare the result with the original number
if digit_sum == number:
print(f"{number} is a magic number!")
else:
print(f"{number} is not a magic number.")
```

This program prompts the user to enter a three-digit number and stores it in the `number` variable. It then uses integer division and modulus operations to extract the individual digits (`digit1`, `digit2`, `digit3`). Next, it calculates the sum of the cubes of these digits and stores it in the `digit_sum` variable. Finally, it compares `digit_sum` with the original `number` to determine if it is a magic number and prints the result accordingly.