If the number is larger that 64 bits then treat it as a string but do the same thing apart from mod 10 divide bt 10.
Sent from my BlackBerry -----Original Message----- From: rgap <rgap...@gmail.com> Sender: algogeeks@googlegroups.com Date: Tue, 18 Jan 2011 03:31:12 To: Algorithm Geeks<algogeeks@googlegroups.com> Reply-To: algogeeks@googlegroups.com Subject: [algogeeks] Count number of digits How can i count the number of digits 0s,1s,2s,3s,... 9s in a number n for example if n=33902 number of 0s=1 number of 3s=2 number of 9s=1 number of 2s=1 -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.