#Whats wrong with this code? the method marks() isn't allowing the user to populate the array

1 messages ยท Page 1 of 1 (latest)

vivid meadow
mint pagodaBOT
# vivid meadow

I uploaded your attachments as gist. That way, they are easier to read for everyone, especially mobile users ๐Ÿ‘

#

<@&987246399047479336> please have a look, thanks.

mint pagodaBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

summer spade
#

look closely at your for loop

vivid meadow
#

oh it has to be >

#

nope same issue

summer spade
vivid meadow
#

i meant <

#

oh it worked now

#

lmao

#

tks

mint pagodaBOT
#

Closed the thread.

urban linden
#

error

#

in ``` for(int i = 0; i>array.length; i++)
{
System.out.print("Enter mark "+(i+1)+ ":");
array[i] = sc.nextInt();
}

mint pagodaBOT
urban linden
#

should be i < array.length

#

@vivid meadow understand the error>?

vivid meadow
#

yes silly mistake