Problem :add all digits of a number

given a no. ,say,  long int num ,to b added

solution that can b tried:

for ( ; num; sum += num%10,num /=10 );

bye4 now

gd


Do you Yahoo!?
Send holiday email and support a worthy cause. Do good.

To unsubscribe : [EMAIL PROTECTED]




Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to