I am needing to write a program for someone that needs it to count by any number they manually enter into the program. I have the menu code written and now just need help with the counnting code. I know i most likely need to use a "for" loop but after that i am not sure.
fireballthor 0 Newbie Poster
Recommended Answers
Jump to Postso, if I input
5
it should count5,10,15,20,25
or1,2,3,4,5
?
Jump to PostFirst of all, there is no need to write into an absolutely dead thread ..
Second, if you can't even think of a loop that can do 1 to 5, you might really want to consider starting from the basics ...
Third .. well here's a loop in 2 versions …
All 5 Replies
ndeniche 402 Posting Virtuoso Featured Poster
fireballthor 0 Newbie Poster
sirlink99 56 Practically a Master Poster
lem_1 0 Newbie Poster
Slavi 94 Master Poster Featured Poster
stultuske commented: or the simpler version: System.out.println("1,2,3,4,5"); :) +13
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.