tag:blogger.com,1999:blog-3115271888627747225.post606378587145712189..comments2023-10-02T14:48:10.642+05:30Comments on noexit4u.com: JAVA PROGRAM: TO FIND SUM OF DIGITS OF A NUMBERManjinder Singhhttp://www.blogger.com/profile/06301835583233376971noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-3115271888627747225.post-17685477345378713812016-03-12T17:43:25.500+05:302016-03-12T17:43:25.500+05:30Using "temp=num%10;" we got the remainde...Using "temp=num%10;" we got the remainder i.e. last digit of number "num". Then we added it to "sum" ("sum" is 0 at starting) using "sum+=temp;". Now we will remove last digit of number by "num=num/10;" . We will repeat this until "num" is 0.<br /><br />Hope you understood. If you have any doubt please feel free to ask.Manjinder Singhhttps://www.blogger.com/profile/06301835583233376971noreply@blogger.comtag:blogger.com,1999:blog-3115271888627747225.post-39094476612340964422016-03-11T19:14:16.016+05:302016-03-11T19:14:16.016+05:30thanks for the code!
can you just explain it to me...thanks for the code!<br />can you just explain it to me roughlyAnonymousnoreply@blogger.com