• Post Reply Bookmark Topic Watch Topic
  • New Topic

Arrays & loops  RSS feed

 
Stacey Johnson
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I have a question I'm working on that I have to get the user to input integers up to an Array of 30 but if they want to end sooner, I want them to be able to enter 0 to get thier result. I know I need a statment to the effect of:
integers !=0
And I know it has to be in a loop format, so my question is where and how do I do it. I'm using JOptionPane windows for the user to input things, but because I'm using "For" loops for the arrays and finding the smallest integer, I don't know how to end the user input before 30 by entering 0. Can anyone help??
Thanks so much!
Stacey :roll:
 
Ruben Steins
Greenhorn
Posts: 15
Chrome IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about

[ January 21, 2004: Message edited by: Ruben Steins ]
 
Ruben Steins
Greenhorn
Posts: 15
Chrome IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ow sorry. I missed the part where you said you used for loops...

[ January 21, 2004: Message edited by: Ruben Steins ]
[ January 21, 2004: Message edited by: Ruben Steins ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!