Can someone explain to me why this wont work? [Java]
Go to solution
Solved by rexist,
your condition for do...while loop is wrong
let's say your input's string is = "This App Won't worK"
the length would be 19
if your x start from 0 to <= 19 that would be 20 loops for only 19 characters.
the first 1 was already close thou.
it should be while(x<k)
-
Featured Topics
-
Topics
-
0
-
5
-
1
-
2
-
0
-
Joseph_Stalin ·
Posted in General Discussion4 -
Evan37 ·
Posted in New Builds and Planning5 -
IlanMS ·
Posted in Peripherals9 -
Frossty ·
Posted in Graphics Cards9 -
StephenB95 ·
Posted in Displays4
-
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now