• Post Reply Bookmark Topic Watch Topic
  • New Topic

What am i missing?  RSS feed

 
Davey Lopez
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello I'm having issues with this code it supposed to accept n number of employees and be able to enter ID numbers for those employees.
Last it should search for an employee ID number and print out the ID number searched



 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66307
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What issues are you having? Be specific.
 
Davey Lopez
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh right sorry, just that its not printing the employee ID number. Here's a sample run.

run:
please enter the amount of employees
2
Please enter the employee ID numbers
123
Please enter the employee ID numbers
234
please enter an ID number to look for
234
1
BUILD SUCCESSFUL (total time: 9 seconds)

Simply why is it returning one?
 
Davey Lopez
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All right never mind I just figured it out my return value simply needed to be changed to return numbers2[index];
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!