• Post Reply Bookmark Topic Watch Topic
  • New Topic

How do you get array elements to print out using users selection/input?  RSS feed

 
Ashly Martinez
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
im trying to make a small program where the user enters their selection choice and it prints out the corresponding information. for example, if they choose "3", i want "3. Soup de Jour" to print out, but im not sure what to do! any tips or help are greatly appreciated

 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look carefully at line 49.
 
Jacob Anawalt
Ranch Hand
Posts: 64
Linux Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Indexing typos aside, you seem to know how to print out the names of your appetizer menu by index (line 50-54). Isn't that what you want to do after they make a selection?

When the user enters 3, what do you do with it?
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ashly Martinez wrote:im trying to make a small program...

Ashley. I've broken up some of your lines because they were far too long and also corrected your indenting. Please read the link because long lines make your thread very hard to read.

Getting the indenting right can also help you to spot logic errors.

Winston
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!