is there a method by which i can regain the value of an integer variable when i have lost it in a while loop
eg. here i had to take 2 more variables carrying the same value as n because in the process the value of n was lost 2 times
Armstrong number
Just store the value of n in a different variable. And use that new variable in the while loop. This way you will not lose the value of n.