[solved] Java program by searching the array for the number requested by the user. If number is found in table program will te
Java program by searching the table for the number requested by the user.
If a number is found in a table, the program will tell the index of the number.
If the number is not found in the table again, the program tells you that no number is found.
/** Thanks for user: Avinesh for code finishing!
* @author 0ks4
Updated working source code
Thanks for both of you!
The index search code was not yet publish on the Sololearn platform.
I try make while loop because I think it`s easier edit right variables.
Like as a general rule if the code doesn't work. The solution is to make a small change in a variable.
@Avinesh for modification makes code working to perfection!
If that's right for you i update my orginal code and in comment I'll mention you as a code in finisher?
This question header can change [solved]
Your code works fine. But to get required output make changes as:
Last print statement move into if statement of while loop..
Print only index not table[index]... Check ones.. then reply.. can be optimized with for loop..