Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.
What is the output of the following Java code (Assume all variables are properly declared and the input is 3 7 4 -1 [Note: four inputs]). num =...
What is the output of the following Java code (Assume all variables are properly declared and the input is 3 7 4 -1 [Note: four inputs]).
num = console.nextInt();
sum = num;
while (num != -1)
{
num = console.nextInt();
sum = sum + num;
}
System.out.println(sum);