Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
Hi, everyone! Where's my mistake?
Maximum value of arrays https://code.sololearn.com/cHEpfz0Dy8Go/?ref=app
4 Respostas
+ 3
modify your loop:
for (int x = 1; x < 5; x++) {
if (arr [x] > max) max = arr[x];
}
+ 2
Daljeet Singh, thanks! There were another mistake with IF syntax! š Finally it works!š„³
https://code.sololearn.com/cHEpfz0Dy8Go/?ref=app
+ 1
Michael, yes, ofcourse! Thank you!š It was a stupid mistake. The code don't running again, but I think it's because of simulation environment.šI saved it with the changes, if you want to check it.
+ 1
Monika recheck closing ) @ line 10 and ;
edit:
https://code.sololearn.com/cBw53CFHo21B/?ref=app