for(i=1;i<=n;i++){ k=i; //Copying the value of 'k' in the variable 'i's=0; //Value of 's', is initialized with '0' at every looping turnwhile(k!=0) //Continue till 'k' is not equal to '0'{r=k%10; //remainder will be stored in 'r'k=k/10; //reducing the value of 'k' by a factor of '10's=s+pow(r,3); //'pow(r,3)' will give the cube of variable 'r'}if(s==i) //If sum 's' is equal to 'i' then its an Armstrong Numbercout<<s<<"\t";}getche(); //To exit the program after an user's keystroke}