sorry
679->4
i tried to do the double loop thing.
its not working
Code:printf(" enter number "); scanf("%d", &digit); copy = digit; do { sumb=0; do { sumb = sumb + copy % 10; copy = copy / 10; if (sumb < 10) { flag = 1; } } while (copy != 0); copy=sumb; } while(flag != 1); printf("%d",sumb);