Hey I have this program that I'm having some trouble figuring out so maybe someone can give me some helpfuls hints. Here goes:

I have to find all numbers between 1 to 999 who when their digits are cubed individually and then all added together, equal the original number. For example take the number 371. Cube the 3 + cube the 7 + cube the 1 = 371. I know how to do most of the problem but I'm not sure how to get each digit alone. I'm sure there is some command to do this in C++ that I simply haven't learned yet. I also figured out that to get the three alone I could just divide it by 100 and label it as an int so the ".71" would just be scratched out. But I'm not sure how I would do this for the 7 and the 1. Any help or hints would be appreciated. Thanks.