Design and implement an application that determines and prints the number of odd, even, and zero digits in an integer value read from the keyboard. (java)
using for loop
sangatik
0
Newbie Poster
Recommended Answers
Jump to PostYou just copy/pasted your assignment without even a moment taken to explain what help you need. That's highly disrespectful to the many people who give their time to help others here.
There are lots of people here who will freely give their time to help you become the best Java …
Jump to PostIf you need to count the leading zeroes, you can't use Scanner's nextInt by itself because it skips the leading zeroes. Either read the input in as a String and iterate through the String counting leading 0's, then converting the String to an Integer, or use Scanner's
hasNext
function along …
All 7 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
sangatik
0
Newbie Poster
rproffitt
2,565
"Nothing to see here."
Moderator
sangatik
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
sangatik
0
Newbie Poster
AssertNull
1,094
Practically a Posting Shark
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.