Given the pseudo code below, what will be the output of the program, when the two parameters x and y are passed by value, and when they are passed by reference?
int x = 1;
int y = 1;
int count = 0;
while count < 3{
addnumbers(x, y);
println (x);
count++;
}
addnumbers(int x, int y){
x = x + y;
println (x);
}