• Cursos
  • Compilador de Código
  • Debatir
  • Precios
  • Teams
Menu

Sesiones de PyR

Why is the output 17 ? (this is the array modul quiz(SoloLearn)) int result = 0; for (int i = 0; i < 5; i++){ if (i == 3) { result += 10; }else{ result += i; } } System.out.println (result);
java
0 Votos
5 Respuestas
22nd Jul 2016, 9:41 AM
Peter Müller
Peter Müller - avatar
What is the output and why? public static int[] make (int n){ int[]a=new int [n]; a [i]=i+1; } return a; } public static void dub (int []jub){ for (intent i=0;i <jub.length;i++){ jub*=2; } } public static int mus (int []zoo){ int jus=0; for (int i=0;i <zoo.length;i++){ jus+=zoo [i]; } return jus; } public static void main (String [] args){ int [] bob =make(5); dub (bob); System.out.println (mus (bob)); }
java
0 Votos
2 Respuestas
9th Jul 2016, 12:20 PM
milada
milada - avatar
< Anterior12Siguiente >
En tendencia hoy
Somebody knows how to solve the problem finance app. Even my result is like it must be, but still I can't pass it
1 Votes
Whyy.
1 Votes
Java certification
1 Votes
Game dev
0 Votes
Question is about for loops and range
0 Votes
Beginner in coding and game development – where should I start?
0 Votes
I can't understand the bug
0 Votes
I have completed 39 courses and now I can't find any other course without those 39 couses what can I do
0 Votes
Coding to automate word documents for technical specifications
1 Votes
Error with code
0 Votes