This is the code for checking Armstrong number. I don't see any error. Please help.
#include<stdio.h>
int main(){
int no;
int k, sum=0;
printf("Enter the no: ");
scanf("%d",&no);
while(no>0){
k=no%10;
sum=sum+(k*k*k);
k=k/10;
}
if(sum==no)
printf("The no is armstrong");
else
printf("The no is not armstrong");
return 0;
}
I tried to write a code for finding Armstrong no (like 153- 1*1*1+5*5*5+3*3*3
).and the program doesn't generate any error, but it also doesn't show the output.
I am using VS code as editor.