Please tell me how to write a program which finds the frequency of each digit of an enterd number.
Eg- if i enter 1112245 the output should come out to be 'Frquency of 1 is 3' 'Frequency of 2 is 2' 'Frequency of 4 is 1' 'Frequency of 5 is 1'.
Plz keep the data type as integer or long.
Lmbcabhi
0
Newbie Poster
Recommended Answers
Jump to PostDaniWeb Member Rules (which you agreed to when you signed up) include:
"Do provide evidence of having done some work yourself if posting questions from school or work assignments"
http://www.daniweb.com/community/rulesPost what you have done so far and someone will help you from there.
Jump to PostThat's a bit of a mess - looks like too much coding before too little thinking?
I suggest you put the code aside, run through a couple of cases step-by-step just using paper and pencil, then write a program that does what you just did on paper. (You will probably …
All 8 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Lmbcabhi
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
iamthwee
mishalparmar
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Yetzederixx
0
Newbie Poster
somjit{}
60
Junior Poster in Training
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.