+ 1
Java Array
So I wanted to make a program, that checks , if the number line is written in order or not, for example if it's 1 2 3 4 5 6 .. then the program prints out that result is 1 ( ordered ) and if it's 2 5 2 1 2 3 4 .. , the program prints out the result 2 ( not in order ) . The thing is that I want to print out the count ( how many numbers are in array ) and the numbers ( that were input in ), but still have no progress with that. Can someone help me with it? https://code.sololearn.com/cNgPAMfyx2X5 - there is the code. Thank you !
3 Respuestas
+ 3
I really hope you like it, I made this for you
https://code.sololearn.com/c2SMs4fO02fo
// Keep learning & happy coding :D
+ 2
You seem to be using recursions there. Is there a requirement for use of recursion? I just think it might be simpler with iteration ...
+ 1
I just wanted to try recursion.