Answer:
- Yes, It contain a logic error in above
code. User want to loop 3 times.
First error:- - index start from 5 up to (but not including) 2 times.
- How the user want to loop 3 times, and it
start from 5 and end in 2
Second error:- - incrementing by 1 = (index + 1 )
User should input (Decrementing by 1 = (index -1)
No comments:
Post a Comment