Courses
LoginStart now
Courses
LoginStart now

Q&A Discussions

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 Votes
5 Answers
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 Votes
2 Answers
9th Jul 2016, 12:20 PM
milada
milada - avatar
< Previous12Next >
Hot today
Hofstadter a sequence code coach is not running
0 Votes
DSA doubt
1 Votes
the code for bigneer is not really what to do after coding begeneer in sololearn
0 Votes
Input errors (python)
1 Votes
Data structure using C
0 Votes
Vote Code
1 Votes
Without degree job
0 Votes
I wanna know is that what about dot net developers in future there is possible they gonna downfall in industry
0 Votes
Welcome to my portfolio. Here you'll find a collection of my projects and creations. I specialize in [Your Specialization, e.g.
0 Votes
How can I add gradient to the background
0 Votes