Does my code follow the function that takes two integer arrays, say p and p, and returns an array containing the contents of both, p then q
in
Programming Questions
•
10 months ago
function that takes two integer
arrays, say p and p, and returns an array
containing the contents of both, p then q
and this is what i got
int[] p = { 5, 10, 15 }; // Alternate syntax
int[] q = { 2, 4, 6 }; // Alternate syntax
int a = p[0] + p[1] + p[2] + q[0] +q[1]+q[2]; // Sets variable 'b' to 180
println(a);
1