Is my code correct? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
24th Apr 2017, 6:33 PM
Aman Karnati
Aman Karnati - avatar
2 Respostas
+ 1
You have to declare array like this int array[]={14,46,35,72}; if you change this for(int i=2;i<=array.length-1;i++) to for(int i=2;i< array.length ; i++) it will be better ( my opinion ) but anyway it works
25th Apr 2017, 2:49 AM
ā€ŽŲ¹Ł„ŁŠ ŁŲ±Ų¹ŁˆŁ†ā€Ž
ā€ŽŲ¹Ł„ŁŠ ŁŲ±Ų¹ŁˆŁ†ā€Ž - avatar
- 1
it seems like you've defined 2 arrays in your integer?
24th Apr 2017, 6:41 PM
George Marr
George Marr - avatar