Suppose the input is 2 3 4 5 0. What is the output of the following code?
import java.util.Scanner;public class Test { public static void main(String[] args) { Scanner input = new Scanner(System.in); int number, sum = 0, count; for (count = 0; count<5; count++) { number = input.nextInt(); sum += number; } System.out.println("sum is " + sum); System.out.println("count is " + count); }}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.