#java guidance
1 messages · Page 1 of 1 (latest)
<@&987246399047479336> please have a look, thanks.
While you are waiting for getting help, here are some tips to improve your experience:
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.
u will get much better feedback if u share some details
otherwise people dont even know what they signed up for or whether they could actually help u or not
that said, people here dont do VC that much. so if u still get no responses, id suggest to switch to chat
this is what I am given: greatestWinIndex = getLargestWinIndex(localScores, opponentScores, numGames);
this is the code I typed:
private static int getLargestWinIndex(int[] localScores, int[] opponentScores, int numGames) {
int greatestWinIndex = 4 ;
for (int i = 0; i < numGames; i++){
if (localScores[i] > greatestWinIndex && opponentScores[i] < greatestWinIndex)
greatestWinIndex =localScores[i];
}
return greatestWinIndex;
}
Detected code, here are some useful tools:
this is the code I typed : private static int getLargestWinIndex(int [] localScores, int [] opponentScores, int numGames) {
int greatestWinIndex = 4;
for (int i = 0; i < numGames; i++) {
if (localScores[i] > greatestWinIndex && opponentScores[i] < greatestWinIndex) greatestWinIndex = localScores[i] ;
}
return greatestWinIndex;
}
arrays:
int[] ourScores = { 19, 18, 10, 11, 43, 24, 38, 34, 33, 10 };
int[] theirScores = { 23, 9, 10, 6, 13, 8, 24, 7, 19, 22 };
Detected code, here are some useful tools:
arrays : int [] ourScores = {
19, 18, 10, 11, 43, 24, 38, 34, 33, 10};
int [] theirScores = {
23, 9, 10, 6, 13, 8, 24, 7, 19, 22};