Dyskusje Q&A
C# method confusion...
4 głosów
20 odpowiedziWhat 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));
}
0 głosów
2 odpowiedziPopularne dzisiaj
How its output is 2 but not 3
0 Votes
Hi
0 Votes
Help
0 Votes
Checking personal activity
0 Votes
Use of global function in c
0 Votes
Python
0 Votes
Full form of HTML
0 Votes
Tryna learn dunno where to start
0 Votes
Où mettre SQL
0 Votes