my assignment is to make a program that prints the n-th Armstrong number. this is what i have so far but for some reason it's not working

14907